Find
public struct Find<T>
Searching for views by their text or type
-
Return number of sections on a collection view data source
Declaration
Swift
public func numberOfSections() -> Int
Return Value
Int
-
Number of rows on a section in a collection view data source
Declaration
Swift
public func number(ofRowsIn section: Int) -> Int
Parameters
ofRowsIn
Section index
Return Value
Int
-
Return number of sections on a table view data source
Declaration
Swift
public func numberOfSections() -> Int
Return Value
Int
-
Number of rows on a section in a table view data source
Declaration
Swift
public func number(ofRowsIn section: Int) -> Int
Parameters
ofRowsIn
Section index
Return Value
Int
-
Search for a label with a specific text
Declaration
Swift
public func first(labelWithText text: String, exactMatch: Bool = true, visualize: VisualizationType = .none) -> UILabel?
Parameters
labelWithText
Text you are looking for
exactMatch
False if you only looking for a part of the string (default: true)
visualize
Visualization types (display route to the element as a view structure)
Return Value
UILabel? (nil if not found)
-
Search for a text field with a specific text
Declaration
Swift
public func first(textFieldWithText text: String, exactMatch: Bool = true, visualize: VisualizationType = .none) -> UITextField?
Parameters
textFieldWithText
Text you are looking for
exactMatch
False if you only looking for a part of the string (default: true)
visualize
Visualization types (display route to the element as a view structure)
Return Value
UITextField? (nil if not found)
-
Search for a search bar with a specific text
Declaration
Swift
public func first(searchBarWithText text: String, exactMatch: Bool = true, visualize: VisualizationType = .none) -> UISearchBar?
Parameters
searchBarWithText
Text you are looking for
exactMatch
False if you only looking for a part of the string (default: true)
visualize
Visualization types (display route to the element as a view structure)
Return Value
UISearchBar? (nil if not found)
-
Search for a text view with a specific text
Declaration
Swift
public func first(textViewWithText text: String, exactMatch: Bool = true, visualize: VisualizationType = .none) -> UITextView?
Parameters
textViewWithText
Text you are looking for
exactMatch
False if you only looking for a part of the string (default: true)
visualize
Visualization types (display route to the element as a view structure)
Return Value
UITextView? (nil if not found)
-
Search for a table view cell with a specific text
Declaration
Swift
public func first(tableViewCellWithText text: String, exactMatch: Bool = true, visualize: VisualizationType = .none) -> UITableViewCell?
Parameters
tableViewCellWithText
Text you are looking for
exactMatch
False if you only looking for a part of the string (default: true)
visualize
Visualization types (display route to the element as a view structure)
Return Value
UITableViewCell? (nil if not found)
-
Search for a button with a specific text
Declaration
Swift
public func first(buttonWithText text: String, exactMatch: Bool = true, visualize: VisualizationType = .none) -> UIButton?
Parameters
buttonWithText
Text you are looking for
exactMatch
False if you only looking for a part of the string (default: true)
visualize
Visualization types (display route to the element as a view structure)
Return Value
UIButton? (nil if not found)
-
Search for a UITableViewHeaderFooterView with a specific text
Declaration
Swift
public func first(tableSectionHeaderFooterViewWithText text: String, exactMatch: Bool = true, visualize: VisualizationType = .none) -> UITableViewHeaderFooterView?
Parameters
tableSectionHeaderFooterViewWithText
Text you are looking for
exactMatch
False if you only looking for a part of the string (default: true)
visualize
Visualization types (display route to the element as a view structure)
Return Value
UITableViewHeaderFooterView? (nil if not found)
-
Search for a UITableView’s header or footer (not section header or footer) with a specific text
Declaration
Swift
public func first(tableHeaderFooterViewWithText text: String, exactMatch: Bool = true, visualize: VisualizationType = .none) -> UIView?
Parameters
tableHeaderFooterViewWithText
Text you are looking for
exactMatch
False if you only looking for a part of the string (default: true)
visualize
Visualization types (display route to the element as a view structure)
Return Value
UIView? (nil if not found)
-
Search for any UIView element with a specific text
Declaration
Swift
public func first(elementWithText text: String, exactMatch: Bool = true, visualize: VisualizationType = .none) -> UIView?
Parameters
elementWithText
Text you are looking for
exactMatch
False if you only looking for a part of the string (default: true)
visualize
Visualization types (display route to the element as a view structure)
Return Value
UIView? (nil if not found)
-
Search for a specific element with a specific text
Declaration
Swift
public func first<E>(elementOfType type: E.Type, withText text: String, exactMatch: Bool = true, visualize: VisualizationType = .none) -> E? where E: UIView
Parameters
elementOfType
UIView element class type
withText
Text you are looking for
exactMatch
False if you only looking for a part of the string (default: true)
visualize
Visualization types (display route to the element as a view structure)
Return Value
Element? (nil if not found, generic method)
-
Search for a table view
Declaration
Swift
public func firstTableView(visualize: VisualizationType = .none) -> UITableView?
Parameters
visualize
Visualization types (display route to the element as a view structure)
Return Value
UITableView? (nil if not found)
-
Search for a collection view
Declaration
Swift
public func firstCollectionView(visualize: VisualizationType = .none) -> UICollectionView?
Parameters
visualize
Visualization types (display route to the element as a view structure)
Return Value
UICollectionView? (nil if not found)
-
Search for a scroll view
Declaration
Swift
public func firstScrollView(visualize: VisualizationType = .none) -> UIScrollView?
Parameters
visualize
Visualization types (display route to the element as a view structure)
Return Value
UIScrollView? (nil if not found)
-
Search for a UITableViewHeaderFooterView
Declaration
Swift
public func firstTableHeaderFooterView(visualize: VisualizationType = .none) -> UITableViewHeaderFooterView?
Parameters
visualize
Visualization types (display route to the element as a view structure)
Return Value
UITableViewHeaderFooterView? (nil if not found)
-
Search for a specific UI element
Declaration
Swift
public func first<E>(elementOfType type: E.Type, visualize: VisualizationType = .none) -> E?
Parameters
elementOfType
UIView element class type
visualize
Visualization types (display route to the element as a view structure)
Return Value
Element? (nil if not found, generic method)
-
Search for a search bar with a specific text
Declaration
Swift
public func all<T>(elementsOfType type: T.Type, visualize: VisualizationType) -> [T]?
Parameters
searchBarWithText
Text you are looking for
exactMatch
False if you only looking for a part of the string (default: true)
visualize
Visualization types (display route to the element as a view structure)
Return Value
[Element]? (nil if not found, generic method)
-
Return a text matching if present in any form on an object
Declaration
Swift
public func anyText(preferablyMatching text: String? = nil) -> String?
Parameters
preferablyMatching
Text you are looking for
Return Value
String? (nil if not found)
-
Find all gesture recognizers of a certain type
Declaration
Swift
public func all<T>(gestureRecognizersOfType type: T.Type) -> [T]
Parameters
ofRowsIn
Section index
Return Value
Int