ScreenThenable
public protocol ScreenThenable
A protocol representing the route to which actions can be added.
-
A type of root container that will be used to perform actions.
See also
ScreenContainer
Declaration
Swift
associatedtype Root : ScreenContainer
-
A type of the current container, which is the container for the actions to be added.
See also
ScreenContainer
Declaration
Swift
associatedtype Current : ScreenContainer
-
Route actions that can be performed in the root container.
Declaration
Swift
var actions: [AnyScreenAction<Root, Void>] { get }
-
Adds actions.
Declaration
Swift
func then(_ actions: [AnyScreenAction<Current, Void>]) -> Self
Parameters
actions
Actions to be added to the current actions.
Return Value
An instance containing the new actions.
-
Adds an action.
Declaration
Swift
func then<Action: ScreenAction>( _ action: Action ) -> Self where Action.Container == Current
Parameters
action
Action to be added to the current actions
Return Value
An instance containing the new action.
-
hideHUD()
Extension methodUndocumented
Declaration
Swift
public func hideHUD() -> Self
-
showHUD(_:
Extension methodanimation: duration: ) Undocumented
Declaration
Swift
public func showHUD( _ hud: HUD, animation: HUDAnimation? = .default, duration: TimeInterval? = nil ) -> Self
-
impactOccurred(style:
Extension method) Undocumented
Declaration
Swift
public func impactOccurred(style: UIImpactFeedbackGenerator.FeedbackStyle) -> Self
-
impactOccurred(intensity:
Extension method) Undocumented
Declaration
Swift
public func impactOccurred(intensity: CGFloat) -> Self
-
notificationOccurred(type:
Extension method) Undocumented
Declaration
Swift
public func notificationOccurred(type: UINotificationFeedbackGenerator.FeedbackType) -> Self
-
selectionChanged()
Extension methodUndocumented
Declaration
Swift
public func selectionChanged() -> Self
-
call(to:
Extension method) Undocumented
Declaration
Swift
public func call(to phoneNumber: String) -> Self
-
mail(to:
Extension methodsubject: body: ) Undocumented
Declaration
Swift
public func mail( to emailAddress: String, subject: String? = nil, body: String? = nil ) -> Self
-
openURL(_:
Extension methodfallbackURLs: options: ) Undocumented
Declaration
Swift
public func openURL( _ url: URL, fallbackURLs: [URL] = [], options: [UIApplication.OpenExternalURLOptionsKey: Any] = [:] ) -> Self
-
openAppSettings()
Extension methodUndocumented
Declaration
Swift
public func openAppSettings() -> Self
-
openStoreApp(id:
Extension methodforReview: ) Undocumented
Declaration
Swift
public func openStoreApp(id: String, forReview: Bool = false) -> Self
-
first(_:
Extension method) Undocumented
Declaration
Swift
public func first<Output: ScreenContainer>( _ predicate: ScreenPredicate<Output> ) -> ScreenRoute<Root, Output>
-
first(_:
Extension methodroute: ) Undocumented
Declaration
Swift
public func first<Output, Route: ScreenThenable>( _ predicate: ScreenPredicate<Output>, route: Route ) -> Self where Route.Root == Output
-
first(_:
Extension methodroute: ) Undocumented
Declaration
Swift
public func first<Output: ScreenContainer>( _ predicate: ScreenPredicate<Output>, route: (_ route: ScreenRootRoute<Output>) -> ScreenRouteConvertible ) -> Self
-
last(_:
Extension method) Undocumented
Declaration
Swift
public func last<Output: ScreenContainer>( _ predicate: ScreenPredicate<Output> ) -> ScreenRoute<Root, Output>
-
last(_:
Extension methodroute: ) Undocumented
Declaration
Swift
public func last<Output, Route: ScreenThenable>( _ predicate: ScreenPredicate<Output>, route: Route ) -> Self where Route.Root == Output
-
last(_:
Extension methodroute: ) Undocumented
Declaration
Swift
public func last<Output: ScreenContainer>( _ predicate: ScreenPredicate<Output>, route: (_ route: ScreenRootRoute<Output>) -> ScreenRouteConvertible ) -> Self
-
top(_:
Extension method) Undocumented
Declaration
Swift
public func top<Output: ScreenContainer>( _ predicate: ScreenPredicate<Output> ) -> ScreenRoute<Root, Output>
-
top(_:
Extension methodroute: ) Undocumented
Declaration
Swift
public func top<Output, Route: ScreenThenable>( _ predicate: ScreenPredicate<Output>, route: Route ) -> Self where Route.Root == Output
-
top(_:
Extension methodroute: ) Undocumented
Declaration
Swift
public func top<Output: ScreenContainer>( _ predicate: ScreenPredicate<Output>, route: (_ route: ScreenRootRoute<Output>) -> ScreenRouteConvertible ) -> Self
-
refresh()
Extension methodUndocumented
Declaration
Swift
public func refresh() -> Self
-
fail(with:
Extension method) Undocumented
Declaration
Swift
public func fail(with error: Error) -> Self
-
fold(action:
Extension method) Performs action to retrieve the container that will be used to perform further actions of the route.
Declaration
Swift
public func fold<Action: ScreenAction>( action: Action ) -> ScreenRoute<Root, Action.Output> where Action.Container == Current
Parameters
action
Action to retrieve the container.
Return Value
An instance containing the new action.
-
fold(action:
Extension methodnested: ) Performs a nested action in the container that will be retrieved by performing another action.
Declaration
Swift
public func fold<Action: ScreenAction, Nested: ScreenAction>( action: Action, nested: Nested ) -> Self where Action.Container == Current, Action.Output == Nested.Container
Parameters
action
Action to retrieve the container.
nested
Nested action to be performed in the retrieved container.
Return Value
An instance containing the new action.
-
fold(action:
Extension methodnested: ) Performs nested actions in the container that will be retrieved by performing another action.
Declaration
Swift
public func fold<Action: ScreenAction>( action: Action, nested: [AnyScreenAction<Action.Output, Void>] ) -> Self where Action.Container == Current, Action.Output: ScreenContainer
Parameters
action
Action to retrieve the container.
nested
Nested actions to be performed in the retrieved container.
Return Value
An instance containing the new action.
-
fold(action:
Extension methodnested: ) Performs a nested rout in the container that will be retrieved by performing another action.
Declaration
Swift
public func fold<Action: ScreenAction, Route: ScreenThenable>( action: Action, nested: Route ) -> Self where Action.Container == Current, Action.Output == Route.Root
Parameters
action
Action to retrieve the container.
nested
Nested route to be performed in the retrieved container.
Return Value
An instance containing the new action.
-
fold(action:
Extension methodnested: ) Performs a nested rout in the container that will be retrieved by performing another action.
Declaration
Swift
public func fold<Action: ScreenAction>( action: Action, nested: (_ route: ScreenRootRoute<Action.Output>) -> ScreenRouteConvertible ) -> Self where Action.Container == Current
Parameters
action
Action to retrieve the container.
nested
The closure that should return the modified route that will be performed in the retrieved container.
Return Value
An instance containing the new action.
-
from(_:
Extension method) Undocumented
Declaration
Swift
public func from<Output: ScreenContainer>( _ container: Output? ) -> ScreenRoute<Root, Output>
-
from(_:
Extension methodto: ) Undocumented
Declaration
Swift
public func from<Output, Route: ScreenThenable>( _ container: Output?, to route: Route ) -> Self where Route.Root == Output
-
from(_:
Extension method_: ) Undocumented
Declaration
Swift
public func from<Output: ScreenContainer>( _ container: Output?, _ route: (_ route: ScreenRootRoute<Output>) -> ScreenRouteConvertible ) -> Self
-
get(body:
Extension method) Undocumented
Declaration
Swift
public func get(body: @escaping ScreenGetAction<Current>.Body) -> Self
-
get(body:
Extension method) Undocumented
Declaration
Swift
public func get(body: @escaping (_ container: Current) -> Void) -> Self
-
wait(for:
Extension method) Waits for a given time interval.
Usage examples
- Shows an error message and dismisses it after 3 seconds:
screenNavigator.navigate(from: container) { route in route .showAlert(.somethingWentWrong) .wait(for: 3.0) .dismiss() }
Declaration
Swift
public func wait(for duration: TimeInterval) -> Self
Parameters
duration
Waiting time in seconds.
Return Value
An instance containing the new action.
-
try(action:
Extension methodresolution: ) Undocumented
Declaration
Swift
public func `try`<Action: ScreenAction>( action: Action, resolution: ScreenTryResolution<Current, Action.Output> ) -> Self where Action.Container == Current
-
try(action:
Extension methodresolution: ) Undocumented
Declaration
Swift
public func `try`<Action: ScreenAction>( action: Action, resolution: ( _ resolution: ScreenTryResolution<Current, Action.Output> ) -> ScreenTryResolution<Current, Action.Output> ) -> Self where Action.Container == Current
-
try(action:
Extension methoddone: ) Undocumented
Declaration
Swift
public func `try`<Action: ScreenAction, Route: ScreenThenable>( action: Action, done: @escaping (_ value: Action.Output) -> Route ) -> Self where Action.Container == Current, Route.Root == Current
-
try(action:
Extension methoddone: ) Undocumented
Declaration
Swift
public func `try`<Action: ScreenAction>( action: Action, done: @escaping ( _ value: Action.Output, _ route: ScreenRootRoute<Current> ) -> ScreenRouteConvertible ) -> Self where Action.Container == Current
-
ensure(with:
Extension method) Undocumented
Declaration
Swift
public func ensure<Route: ScreenThenable>( with route: Route ) -> ScreenRootRoute<Root> where Route.Root == Root
-
ensure(with:
Extension method) Undocumented
Declaration
Swift
public func ensure( with route: (_ route: ScreenRootRoute<Root>) -> ScreenRouteConvertible ) -> ScreenRootRoute<Root>
-
fallback(to:
Extension method) Undocumented
Declaration
Swift
public func fallback<Route: ScreenThenable>( to route: @escaping (_ error: Error) -> Route ) -> ScreenRootRoute<Root> where Route.Root == Root
-
fallback(to:
Extension method) Undocumented
Declaration
Swift
public func fallback( to route: @escaping ( _ error: Error, _ route: ScreenRootRoute<Root> ) -> ScreenRouteConvertible ) -> ScreenRootRoute<Root>
-
fallback(to:
Extension method) Undocumented
Declaration
Swift
public func fallback<Route: ScreenThenable>( to route: Route ) -> ScreenRootRoute<Root> where Route.Root == Root
-
cauterize()
Extension methodUndocumented
Declaration
Swift
public func cauterize() -> ScreenRootRoute<Root>
-
showActionSheet(_:
Extension methodanimated: ) Undocumented
Declaration
Swift
public func showActionSheet( _ actionSheet: ActionSheet, animated: Bool = true ) -> Self
-
showAlert(_:
Extension methodanimated: ) Undocumented
Declaration
Swift
public func showAlert( _ alert: Alert, animated: Bool = true ) -> Self
-
showDocumentPreview(_:
Extension methodanimated: route: ) Undocumented
Declaration
Swift
public func showDocumentPreview<Route: ScreenThenable>( _ documentPreview: DocumentPreview, animated: Bool = true, route: Route ) -> Self where Route.Root == UIDocumentInteractionController
-
showDocumentPreview(_:
Extension methodanimated: route: ) Undocumented
Declaration
Swift
public func showDocumentPreview( _ documentPreview: DocumentPreview, animated: Bool = true, route: ( _ route: ScreenRootRoute<UIDocumentInteractionController> ) -> ScreenRouteConvertible = { $0 } ) -> Self
-
showMediaPicker(_:
Extension methodanimated: route: ) Undocumented
Declaration
Swift
public func showMediaPicker<Route: ScreenThenable>( _ mediaPicker: MediaPicker, animated: Bool = true, route: Route ) -> Self where Route.Root == UIImagePickerController
-
showMediaPicker(_:
Extension methodanimated: route: ) Undocumented
Declaration
Swift
public func showMediaPicker( _ mediaPicker: MediaPicker, animated: Bool = true, route: ( _ route: ScreenRootRoute<UIImagePickerController> ) -> ScreenRouteConvertible = { $0 } ) -> Self
-
showSafari(_:
Extension methodanimated: route: ) -
showSafari(_:
Extension methodanimated: route: ) Undocumented
Declaration
Swift
public func showSafari( _ safari: Safari, animated: Bool = true, route: ( _ route: ScreenRootRoute<SFSafariViewController> ) -> ScreenRouteConvertible = { $0 } ) -> Self
-
share(_:
Extension methodanimated: route: ) -
share(_:
Extension methodanimated: route: ) Undocumented
Declaration
Swift
public func share( _ sharing: Sharing, animated: Bool = true, route: ( _ route: ScreenRootRoute<UIActivityViewController> ) -> ScreenRouteConvertible = { $0 } ) -> Self
-
showStoreProduct(_:
Extension methodanimated: route: ) Undocumented
Declaration
Swift
public func showStoreProduct<Route: ScreenThenable>( _ storeProduct: StoreProduct, animated: Bool = true, route: Route ) -> Self where Route.Root == SKStoreProductViewController
-
showStoreProduct(_:
Extension methodanimated: route: ) Undocumented
Declaration
Swift
public func showStoreProduct( _ storeProduct: StoreProduct, animated: Bool = true, route: ( _ route: ScreenRootRoute<SKStoreProductViewController> ) -> ScreenRouteConvertible = { $0 } ) -> Self
-
requestStoreReview()
Extension methodUndocumented
Declaration
Swift
public func requestStoreReview() -> Self
-
makeVisible(stackAnimation:
Extension methodtabsAnimation: dissmissAnimated: ) Undocumented
Declaration
Swift
public func makeVisible( stackAnimation: ScreenStackAnimation? = .default, tabsAnimation: ScreenTabAnimation? = nil, dissmissAnimated: Bool = true ) -> Self
-
dismiss(animated:
Extension method) Dismisses the screen container that was presented modally by the container in which the action is performed.
Note
Unlike thedismiss(animated:completion:)
method ofUIViewController
, this action dismisses only the presented container.Usage examples
navigator.navigate(from: container) { $0.dismiss() }
Declaration
Swift
public func dismiss(animated: Bool = true) -> Self
Parameters
animated
Pass
true
to animate the transition orfalse
if you do not want the transition to be animated. The default value istrue
.Return Value
An instance containing the new action.
-
present(_:
Extension methodanimated: route: ) Presents a screen modally and performs a route on the screen container.
Usage examples
- Presents a chat screen modally, then shows an error message on its container:
let nestedRoute = ScreenModalRoute().showAlert(.somethingWentWrong) navigator.navigate(from: container) { route in route.present(ChatScreen(chatID: chatID), route: nestedRoute) }
See also
Declaration
Parameters
screen
The screen to display over the current container’s content.
animated
Pass
true
to animate the transition orfalse
if you do not want the transition to be animated. The default value istrue
.route
The route that will be performed in the presented screen container.
Return Value
An instance containing the new action.
-
present(_:
Extension methodanimated: route: ) Presents a screen modally and performs a route on the screen container.
Usage examples
- Presents a chat screen modally:
navigator.navigate(from: container) { route in route.present(ChatScreen(chatID: chatID)) }
- Presents a chat screen modally, then shows an error message on its container:
navigator.navigate(from: container) { route in route.present(ChatScreen(chatID: chatID)) { route in route.showAlert(.somethingWentWrong) } }
See also
Declaration
Swift
public func present<New: Screen>( _ screen: New, animated: Bool = true, route: (_ route: ScreenRootRoute<New.Container>) -> ScreenRouteConvertible = { $0 } ) -> Self where New.Container: UIViewController
Parameters
screen
The screen to display over the current container’s content.
animated
Pass
true
to animate the transition orfalse
if you do not want the transition to be animated. The default value istrue
.route
The closure that should return the modified route that will be performed in the presented screen container. The default value returns empty route.
Return Value
An instance containing the new action.
-
presented
Extension methodRetrieves the modal container that is presented by the current container, or one of its ancestors in the container hierarchy.
Usage examples
- Dismisses the screen container that is presented by the presented container:
navigator.navigate(from: container) { route in route .presented .dismiss() }
Declaration
Swift
public var presented: ScreenRoute<Root, UIViewController> { get }
Return Value
An instance containing the new action.
-
presented(of:
Extension method) Retrieves the screen container that is presented by the current container, or one of its ancestors in the container hierarchy.
Usage examples
- Pops the top screen container from the stack that is presented by the container:
navigator.navigate(from: container) { route in route .presented(of: UINavigationController.self) .pop() }
Declaration
Swift
public func presented<Output: UIViewController>( of type: Output.Type ) -> ScreenRoute<Root, Output>
Parameters
type
The type to which the container will be cast.
Return Value
An instance containing the new action.
-
presented(of:
Extension methodroute: ) Performs a route on the screen container that is presented by the current container, or one of its ancestors in the container hierarchy.
Usage examples
- Pops the top screen container from the stack that is presented by the container:
let nestedRoute = ScreenStackRoute().pop() navigator.navigate(from: container) { route in route.presented(of: UINavigationController.self, route: nestedRoute) }
- Dismisses the screen container that is presented by the presented container:
let nestedRoute = ScreenModalRoute().dismiss() navigator.navigate(from: container) { route in route.presented(route: nestedRoute) }
Declaration
Parameters
type
The type to which the container will be cast.
route
The route that will be performed in the retrieved screen container.
Return Value
An instance containing the new action.
-
presented(of:
Extension methodroute: ) Performs a route on the screen container that is presented by the current container, or one of its ancestors in the container hierarchy.
Usage examples
- Pops the top screen container from the stack that is presented by the container:
navigator.navigate(from: container) { route in route.presented(of: UINavigationController.self) { $0.pop() } }
- Dismisses the container that is presented by the presented container:
navigator.navigate(from: container) { route in route.presented { $0.dismiss() } }
Declaration
Swift
public func presented<Output: UIViewController>( of type: Output.Type = Output.self, route: (_ route: ScreenRootRoute<Output>) -> ScreenRouteConvertible ) -> Self
Parameters
type
The type to which the container will be cast.
route
The closure that should return the modified route that will be performed in the retrieved screen container.
Return Value
An instance containing the new action.
-
presenting
Extension methodRetrieves the modal container that presented the current container.
Usage examples
- Dismisses the current container:
navigator.navigate(from: container) { route in route .presenting .dismiss() }
Declaration
Swift
public var presenting: ScreenRoute<Root, UIViewController> { get }
Return Value
An instance containing the new action.
-
presenting(of:
Extension method) Retrieves the screen container that presented the current container.
Usage examples
- Pops the top screen container from the stack that presented the current container:
navigator.navigate(from: container) { route in route .presenting(of: UINavigationController.self) .pop() }
Declaration
Swift
public func presenting<Output: UIViewController>( of type: Output.Type ) -> ScreenRoute<Root, Output>
Parameters
type
The type to which the container will be cast.
Return Value
An instance containing the new action.
-
presenting(of:
Extension methodroute: ) Performs a route on the screen container that presented the current container.
Usage examples
- Pops the top screen container from the stack that presented the current container:
let nestedRoute = ScreenStackRoute().pop() navigator.navigate(from: container) { route in route.presenting(of: UINavigationController.self, route: nestedRoute) }
- Dismisses the current container:
let nestedRoute = ScreenModalRoute().dismiss() navigator.navigate(from: container) { route in route.presenting(route: nestedRoute) }
Declaration
Swift
public func presenting<Output: UIViewController, Next: ScreenContainer>( of type: Output.Type = Output.self, route: ScreenRoute<Output, Next> ) -> Self
Parameters
type
The type to which the container will be cast.
route
The route that will be performed in the retrieved screen container.
Return Value
An instance containing the new action.
-
presenting(of:
Extension methodroute: ) Performs a route on the screen container that presented the current container.
Usage examples
- Pops the top screen container from the stack that presented the current container:
navigator.navigate(from: container) { route in route.presenting(of: UINavigationController.self) { $0.pop() } }
- Dismisses the current container:
navigator.navigate(from: container) { route in route.presenting { $0.dismiss() } }
Declaration
Swift
public func presenting<Output: UIViewController>( of type: Output.Type = Output.self, route: (_ route: ScreenRootRoute<Output>) -> ScreenRouteConvertible ) -> Self
Parameters
type
The type to which the container will be cast.
route
The closure that should return the modified route that will be performed in the retrieved screen container.
Return Value
An instance containing the new action.
-
stack
Extension methodRetrieves the nearest ancestor in the container hierarchy that is a stack container.
Usage examples
- Pops the top screen container from the stack of the current container:
navigator.navigate(from: container) { route in route .stack .pop() }
Declaration
Swift
public var stack: ScreenRoute<Root, UINavigationController> { get }
Return Value
An instance containing the new action.
-
stack(of:
Extension method) Retrieves the nearest ancestor in the container hierarchy that is a stack container.
Usage examples
- Pops the top screen container from the stack of the current container:
navigator.navigate(from: container) { route in route .stack(of: MyNavigationController.self) .pop() }
Declaration
Swift
public func stack<Output: UINavigationController>( of type: Output.Type ) -> ScreenRoute<Root, Output>
Parameters
type
The type to which the container will be cast.
Return Value
An instance containing the new action.
-
stack(of:
Extension methodroute: ) Performs a route on the nearest ancestor in the container hierarchy that is a stack container.
Usage examples
- Pops the top screen container from the stack of the current container:
let nestedRoute = ScreenStackRoute().pop() navigator.navigate(from: container) { route in route.stack(route: nestedRoute) }
Declaration
Parameters
type
The type to which the container will be cast.
route
The route that will be performed in the retrieved screen container.
Return Value
An instance containing the new action.
-
stack(of:
Extension methodroute: ) Performs a route on the nearest ancestor in the container hierarchy that is a stack container.
Usage examples
- Pops the top screen container from the stack of the current container:
navigator.navigate(from: container) { route in route.stack { $0.pop() } }
Declaration
Swift
public func stack<Output: UINavigationController>( of type: Output.Type = Output.self, route: (_ route: ScreenRootRoute<Output>) -> ScreenRouteConvertible ) -> Self
Parameters
type
The type to which the container will be cast.
route
The closure that should return the modified route that will be performed in the retrieved screen container.
Return Value
An instance containing the new action.
-
tabs
Extension methodRetrieves the nearest ancestor in the container hierarchy that is a tabs container.
Usage examples
- Selects tab from the tab container of the current container:
navigator.navigate(from: container) { route in route .tabs .selectTab(with: .index(1)) }
Declaration
Swift
public var tabs: ScreenRoute<Root, UITabBarController> { get }
Return Value
An instance containing the new action.
-
tabs(of:
Extension method) Retrieves the nearest ancestor in the container hierarchy that is a tabs container.
Usage examples
- Selects tab from the tab container of the current container:
navigator.navigate(from: container) { route in route .tabs(of: MyTabBarController.self) .selectTab(with: .index(1)) }
Declaration
Swift
public func tabs<Output: UITabBarController>( of type: Output.Type ) -> ScreenRoute<Root, Output>
Parameters
type
The type to which the container will be cast.
Return Value
An instance containing the new action.
-
tabs(of:
Extension methodroute: ) Retrieves the nearest ancestor in the container hierarchy that is a tabs container.
Usage examples
- Selects tab from the tab container of the current container:
let nestedRoute = ScreenTabsRoute().selectTab(with: .index(1)) navigator.navigate(from: container) { route in route.tabs(route: nestedRoute) }
Declaration
Parameters
type
The type to which the container will be cast.
route
The route that will be performed in the retrieved screen container.
Return Value
An instance containing the new action.
-
tabs(of:
Extension methodroute: ) Retrieves the nearest ancestor in the container hierarchy that is a tabs container.
Usage examples
- Selects tab from the tab container of the current container:
navigator.navigate(from: container) { route in route.tabs(route: nestedRoute) { $0.selectTab(with: .index(1)) } }
Declaration
Swift
public func tabs<Output: UITabBarController>( of type: Output.Type = Output.self, route: (_ route: ScreenRootRoute<Output>) -> ScreenRouteConvertible ) -> Self
Parameters
type
The type to which the container will be cast.
route
The closure that should return the modified route that will be performed in the retrieved screen container.
Return Value
An instance containing the new action.
-
window
Extension methodRetrieves the window container of the current container.
Usage examples
- Dismisses the screen container represented by the root container of the window:
navigator.navigate(from: container) { route in route .window .root .dismiss() }
Declaration
Swift
public var window: ScreenRoute<Root, UIWindow> { get }
Return Value
An instance containing the new action.
-
window(of:
Extension method) Retrieves the window container of the current container.
Usage examples
- Shows the window container of the current container and makes it the key window:
navigator.navigate(from: container) { route in route .window(of: UIWindow.self) .makeKeyAndVisible() }
Declaration
Swift
public func window<Output: UIWindow>( of type: Output.Type ) -> ScreenRoute<Root, Output>
Parameters
type
The type to which the container will be cast.
Return Value
An instance containing the new action.
-
window(of:
Extension methodroute: ) Performs a route on the window container of the current container.
Usage examples
- Dismisses the screen container represented by the root container of the window:
let nestedRoute = ScreenWindowRoute() .root .dismiss() navigator.navigate(from: container) { route in route.window(of: UIWindow.self, route: nestedRoute) }
- Shows the window container of the current container and makes it the key window:
navigator.navigate(from: container) { route in route .window(of: UIWindow.self) .makeKeyAndVisible() }
Declaration
Parameters
type
The type to which the container will be cast.
route
The route that will be performed in the retrieved screen container.
Return Value
An instance containing the new action.
-
window(of:
Extension methodroute: ) Performs a route on the window container of the current container.
Usage examples
- Dismisses the screen container represented by the root container of the window:
navigator.navigate(from: container) { route in route.window { $0.root.dismiss() } }
- Shows the window container of the current container and makes it the key window:
navigator.navigate(from: container) { route in route.window(of: UIWindow.self) { $0.makeKeyAndVisible() } }
Declaration
Swift
public func window<Output: UIWindow>( of type: Output.Type = Output.self, route: (_ route: ScreenRootRoute<Output>) -> ScreenRouteConvertible ) -> Self
Parameters
type
The type to which the container will be cast.
route
The closure that should return the modified route that will be performed in the retrieved screen container.
Return Value
An instance containing the new action.
-
stackRoot
Extension methodUndocumented
Declaration
Swift
public var stackRoot: ScreenRoute<Root, UIViewController> { get }
-
stackRoot(of:
Extension method) Undocumented
Declaration
Swift
public func stackRoot<Output: UIViewController>( of type: Output.Type ) -> ScreenRoute<Root, Output>
-
stackRoot(of:
Extension methodroute: ) -
stackRoot(of:
Extension methodroute: ) Undocumented
Declaration
Swift
public func stackRoot<Output: UIViewController>( of type: Output.Type = Output.self, route: (_ route: ScreenRootRoute<Output>) -> ScreenRouteConvertible ) -> Self
-
stackTop
Extension methodUndocumented
Declaration
Swift
public var stackTop: ScreenRoute<Root, UIViewController> { get }
-
stackTop(of:
Extension method) Undocumented
Declaration
Swift
public func stackTop<Output: UIViewController>( of type: Output.Type ) -> ScreenRoute<Root, Output>
-
stackTop(of:
Extension methodroute: ) -
stackTop(of:
Extension methodroute: ) Undocumented
Declaration
Swift
public func stackTop<Output: UIViewController>( of type: Output.Type = Output.self, route: (_ route: ScreenRootRoute<Output>) -> ScreenRouteConvertible ) -> Self
-
stackVisible
Extension methodUndocumented
Declaration
Swift
public var stackVisible: ScreenRoute<Root, UIViewController> { get }
-
stackVisible(of:
Extension method) Undocumented
Declaration
Swift
public func stackVisible<Output: UIViewController>( of type: Output.Type ) -> ScreenRoute<Root, Output>
-
stackVisible(of:
Extension methodroute: ) Undocumented
Declaration
Swift
public func stackVisible<Output: UIViewController, Route: ScreenThenable>( of type: Output.Type = Output.self, route: Route ) -> Self where Route.Root == Output
-
stackVisible(of:
Extension methodroute: ) Undocumented
Declaration
Swift
public func stackVisible<Output: UIViewController>( of type: Output.Type = Output.self, route: (_ route: ScreenRootRoute<Output>) -> ScreenRouteConvertible ) -> Self
-
pop(to:
Extension methodanimation: separated: ) Undocumented
Declaration
Swift
public func pop( to predicate: ScreenStackPopPredicate, animation: ScreenStackAnimation? = .default, separated: Bool = false ) -> Self
-
pop(animation:
Extension methodseparated: ) Undocumented
Declaration
Swift
public func pop( animation: ScreenStackAnimation? = .default, separated: Bool = false ) -> Self
-
popToRoot(animation:
Extension methodseparated: ) Undocumented
Declaration
Swift
public func popToRoot( animation: ScreenStackAnimation? = .default, separated: Bool = false ) -> Self
-
clear(animation:
Extension method) Undocumented
Declaration
Swift
public func clear(animation: ScreenStackAnimation? = .default) -> Self
-
push(_:
Extension methodanimation: separated: ) Undocumented
Declaration
Swift
public func push<New: Screen>( _ screen: New, animation: ScreenStackAnimation? = .default, separated: Bool = false ) -> Self where New.Container: UIViewController
-
push(_:
Extension methodanimation: separated: route: ) Undocumented
Declaration
Swift
public func push<New: Screen, Route: ScreenThenable>( _ screen: New, animation: ScreenStackAnimation? = .default, separated: Bool = false, route: Route ) -> Self where New.Container: UIViewController, Route.Root == New.Container
-
push(_:
Extension methodanimation: separated: route: ) Undocumented
Declaration
Swift
public func push<New: Screen>( _ screen: New, animation: ScreenStackAnimation? = .default, separated: Bool = false, route: (_ route: ScreenRootRoute<New.Container>) -> ScreenRouteConvertible ) -> Self where New.Container: UIViewController
-
replace(with:
Extension methodanimation: separated: ) Undocumented
Declaration
Swift
public func replace<New: Screen>( with screen: New, animation: ScreenStackAnimation? = .default, separated: Bool = false ) -> Self where New.Container: UIViewController
-
replace(with:
Extension methodanimation: separated: route: ) Undocumented
Declaration
Swift
public func replace<New: Screen, Route: ScreenThenable>( with screen: New, animation: ScreenStackAnimation? = .default, separated: Bool = false, route: Route ) -> Self where New.Container: UIViewController, Route.Root == New.Container
-
replace(with:
Extension methodanimation: separated: route: ) Undocumented
Declaration
Swift
public func replace<New: Screen>( with screen: New, animation: ScreenStackAnimation? = .default, separated: Bool = false, route: (_ route: ScreenRootRoute<New.Container>) -> ScreenRouteConvertible ) -> Self where New.Container: UIViewController
-
setStack(modifiers:
Extension methodanimation: separated: ) Undocumented
Declaration
Swift
public func setStack( modifiers: [ScreenStackModifier], animation: ScreenStackAnimation? = .default, separated: Bool = false ) -> Self
-
setStack(modifier:
Extension methodanimation: separated: ) Undocumented
Declaration
Swift
public func setStack( modifier: ScreenStackModifier, animation: ScreenStackAnimation? = .default, separated: Bool = false ) -> Self
-
selectedTab
Extension methodUndocumented
Declaration
Swift
public var selectedTab: ScreenRoute<Root, UIViewController> { get }
-
selectedTab(of:
Extension method) Undocumented
Declaration
Swift
public func selectedTab<Output: UIViewController>( of type: Output.Type ) -> ScreenRoute<Root, Output>
-
selectedTab(of:
Extension methodroute: ) Undocumented
Declaration
Swift
public func selectedTab<Output: UIViewController, Route: ScreenThenable>( of type: Output.Type = Output.self, route: Route ) -> Self where Route.Root == Output
-
selectedTab(of:
Extension methodroute: ) Undocumented
Declaration
Swift
public func selectedTab<Output: UIViewController>( of type: Output.Type = Output.self, route: (_ route: ScreenRootRoute<Output>) -> ScreenRouteConvertible ) -> Self
-
setupTab(with:
Extension methodroute: ) -
setupTab(with:
Extension methodroute: ) Undocumented
Declaration
Swift
public func setupTab<New: Screen>( with screen: New, route: (_ route: ScreenRootRoute<New.Container>) -> ScreenRouteConvertible = { $0 } ) -> Self where New.Container: UIViewController
-
selectTab(of:
Extension methodwith: animation: route: ) Undocumented
Declaration
Swift
public func selectTab<Output: UIViewController, Route: ScreenThenable>( of type: Output.Type = Output.self, with predicate: ScreenTabPredicate, animation: ScreenTabAnimation? = nil, route: Route ) -> Self where Route.Root == Output
-
selectTab(of:
Extension methodwith: animation: route: ) Undocumented
Declaration
Swift
public func selectTab<Output: UIViewController>( of type: Output.Type = Output.self, with predicate: ScreenTabPredicate, animation: ScreenTabAnimation? = nil, route: (_ route: ScreenRootRoute<Output>) -> ScreenRouteConvertible = { $0 } ) -> Self
-
makeKey()
Extension methodMakes the receiver the key window.
Usage examples
- Makes the window container of the current container the key window:
navigator.navigate(from: container) { route in route .window .makeKey() }
Declaration
Swift
public func makeKey() -> Self
Return Value
An instance containing the new action.
-
makeKeyAndVisible()
Extension methodShows the window container and makes it the key window.
Usage examples
- Shows the window container of the current container and makes it the key window:
navigator.navigate(from: container) { route in route .window .makeKeyAndVisible() }
Declaration
Swift
public func makeKeyAndVisible() -> Self
Return Value
An instance containing the new action.
-
root
Extension methodUndocumented
Declaration
Swift
public var root: ScreenRoute<Root, UIViewController> { get }
-
root(of:
Extension method) Undocumented
Declaration
Swift
public func root<Output: UIViewController>( of type: Output.Type = Output.self ) -> ScreenRoute<Root, Output>
-
root(of:
Extension methodroute: ) -
root(of:
Extension methodroute: ) Undocumented
Declaration
Swift
public func root<Output: UIViewController>( of type: Output.Type = Output.self, route: (_ route: ScreenRootRoute<Output>) -> ScreenRouteConvertible ) -> Self
-
setRoot(to:
Extension methodanimation: route: ) Undocumented
Declaration
Swift
public func setRoot<New: Screen, Route: ScreenThenable>( to screen: New, animation: ScreenRootAnimation? = nil, route: Route ) -> Self where New.Container: UIViewController, Route.Root == New.Container
-
setRoot(to:
Extension methodanimation: route: ) Undocumented
Declaration
Swift
public func setRoot<New: Screen>( to screen: New, animation: ScreenRootAnimation? = nil, route: (_ route: ScreenRootRoute<New.Container>) -> ScreenRouteConvertible = { $0 } ) -> Self where New.Container: UIViewController