AnyCoordinator
public protocol AnyCoordinator
You conform to the AnyCoordinator protocol to define the
coordinator that manages the navigation lifecycle of a view by
coordinating its corresponding view model.
Implement the required viewModelType property to provide
the view model type.
-
The presentation use by the coordinator to present the view for the corresponding view model.
Declaration
Swift
var presentation: MwxPresentation { get set } -
The input used to initialize this view model and passed from presenting view models.
Declaration
Swift
var input: MwxInput? { get set } -
The callback closure that is invoked when the view for the corresponding view model disappears.
Declaration
Swift
var onDisappear: (() -> Void)? { get set }
-
The managing coordinator that presented and is used to manage the current coordinator.
Declaration
Swift
var managingCoordinator: AnyCoordinator? { get set }
-
The view that is of the coordinator manages its navigation lifecycle by coordinating its corresponding view model.
Declaration
Swift
var view: AnyView { get }
-
Call this function to show the coordinator by changing its activator state property.
Note
Only works with link and sheet coordinators.Declaration
Swift
func show() -
Call this function to deactivate the coordinator by changing its activator state property.
Note
Only works with link coordinators.Declaration
Swift
func pop() -
Call this function to deactivate the coordinator by changing its activator state property.
Note
Only works with sheet coordinators.Declaration
Swift
func dismiss() -
Call this function to select the tab coordinator by changing its selection state property.
Note
Works with current tab coordinator or its managing coordinator hierarchy.Declaration
Swift
func select(tab selection: Int)Parameters
selectionA
Intindicates the index tag of the selected tab view item.
-
Call this function to deactivate the coordinator by changing its activator state property.
Declaration
Swift
func deactivate() -
Call this function to select the tab coordinator by changing its selection state property.
Note
Only works with the current tab coordinator.Declaration
Swift
func setSelection(tab selection: Int)Parameters
selectionA
Intindicates the index tag of the selected tab view item.
View on GitHub
AnyCoordinator Protocol Reference