Finder
@MainActor
public protocol Finder
An instance that conforms to the Finder protocol will be used by the Router to find out if some UIViewController
instance is integrated into the view controller stack
-
Type of
UIViewControllerthatFindercan findDeclaration
Swift
associatedtype ViewController : UIViewController -
Type of
Contextobject thatFindercan deal withDeclaration
Swift
associatedtype Context
-
Returns the view controller instance if it is present in the stack.
Declaration
Swift
@MainActor func findViewController(with context: Context) throws -> ViewController?Return Value
The
UIViewControllerinstance that theRouteris looking for, nil otherwise.
-
getViewController(with:Extension method) Returns the view controller instance if it is present in the stack. Doesn’t throw any exceptions in case the search can not be performed.
Declaration
Swift
@MainActor func getViewController(with context: Context) -> ViewController?Return Value
The
UIViewControllerinstance that theRouteris looking for, nil otherwise.
-
findViewController()Extension methodReturns the view controller instance if it is present in the stack.
Declaration
Swift
@MainActor func findViewController() throws -> ViewController?Return Value
The
UIViewControllerinstance that theRouteris looking for, nil otherwise. -
getViewController()Extension methodReturns the view controller instance if it is present in the stack. Doesn’t throw any exceptions in case the search can not be performed.
Declaration
Swift
@MainActor func getViewController() -> ViewController?Return Value
The
UIViewControllerinstance that theRouteris looking for, nil otherwise.
-
findViewController()Extension methodReturns the view controller instance if it is present in the stack.
Declaration
Swift
@MainActor func findViewController() throws -> ViewController?Return Value
The
UIViewControllerinstance that theRouteris looking for, nil otherwise. -
getViewController()Extension methodReturns the view controller instance if it is present in the stack. Doesn’t throw any exceptions in case the search can not be performed.
Declaration
Swift
@MainActor func getViewController() -> ViewController?Return Value
The
UIViewControllerinstance that theRouteris looking for, nil otherwise.