Check
public struct Check<T>
Checking properties of an object or a view
-
Check if there are any cells that don’t fit criteria specified in a closure
Declaration
Swift
public func allCells(fit evaluateClosure: (UICollectionViewCell)->Bool) -> Bool
Parameters
fit
Closure that needs to evaluate the cell which is passed onto it
Return Value
Bool (true if no issue is found)
-
Check if there are any cells that don’t fit criteria specified in a closure
Declaration
Swift
public func allCells(thatDontFit evaluateClosure: (UICollectionViewCell)->Bool) -> [IndexPath]
Parameters
fit
Closure that needs to evaluate the cell which is passed onto it
Return Value
[IndexPath] Index path of all cells that do not match the given criteria
-
Check if there are any cells that don’t fit criteria specified in a closure
Declaration
Swift
public func allCells(fit evaluateClosure: (UITableViewCell)->Bool) -> Bool
Parameters
fit
Closure that needs to evaluate the cell which is passed onto it
Return Value
Bool (true if no issue is found)
-
Check if there are any cells that don’t fit criteria specified in a closure
Declaration
Swift
public func allCells(thatDontFit evaluateClosure: (UITableViewCell)->Bool) -> [IndexPath]
Parameters
fit
Closure that needs to evaluate the cell which is passed onto it
Return Value
[IndexPath] Index path of all cells that do not match the given criteria
-
Check if any view is/should be visible on screen
Declaration
Swift
public func isVisible(on parentView: UIView? = nil, visualize: VisualizationType = .none) -> Bool
Parameters
on
Specify a root view to check against (if left as nil, last parent view will be assumed as root in a UIViewController so we do recommend to pass a root view to check against to have more dicisive result)
visualize
Visualization types (display route to the element as a view structure)
Return Value
Bool (true if found)
-
Look for a specific view controller in your navigation stack
Declaration
Swift
public func has(siblingInNavigationStack viewController: UIViewController) -> Bool
Parameters
siblingInNavigationStack
View controller you are looking for
Return Value
Bool (true if found)
-
Check if a view controller has a child view controller
Declaration
Swift
public func has(childViewController viewController: UIViewController) -> Bool
Parameters
childViewController
View controller you are looking for
Return Value
Bool (true if found)
-
Check if a view controller has a specific class type in its navigation stack
Declaration
Swift
public func contains<T>(siblingClassInNavigationStack viewControllerClass: T.Type) -> Bool where T: UIViewController
Parameters
siblingClassInNavigationStack
Class of a view controller you are looking for
Return Value
Bool (true if found)
-
Check if a view controller has specifit class type of a child view controller
Declaration
Swift
public func contains<T>(childViewControllerClass viewControllerClass: T.Type) -> Bool where T: UIViewController
Parameters
childViewControllerClass
Class of a view controller you are looking for
Return Value
Bool (true if found)
-
Check is navigation view controller contains certain view controller
Declaration
Swift
public func has(viewController: UIViewController) -> Bool
Parameters
viewController
View controller you are looking for
Return Value
Bool (true if found)
-
Check is navigation view controller contains certain type of a view controller
Declaration
Swift
public func contains<T>(viewControllerClass: T.Type) -> Bool where T: UIViewController
Parameters
viewControllerClass
Class of a view controller you are looking for
Return Value
Bool (true if found)