NavigationCoordinator
open class NavigationCoordinator<RouteType> : BaseCoordinator<RouteType, NavigationTransition> where RouteType : Route
NavigationCoordinator acts as a base class for custom coordinators with a UINavigationController
as rootViewController.
NavigationCoordinator especially ensures that transition animations are called,
which would not be the case when creating a BaseCoordinator<RouteType, NavigationTransition>.
-
The animation delegate controlling the rootViewController’s transition animations. This animation delegate is set to be the rootViewController’s rootViewController, if you did not set one earlier.
Note
Use thedelegateproperty to set a custom delegate and use transition animations provided by XCoordinator.Declaration
Swift
public let animationDelegate: NavigationAnimationDelegate
-
This represents a fallback-delegate to be notified about navigation controller events. It is further used to call animation methods when no animation has been specified in the transition.
Declaration
Swift
public var delegate: UINavigationControllerDelegate? { get set }
-
Creates a NavigationCoordinator and optionally triggers an initial route.
Declaration
Swift
public override init(rootViewController: RootViewController = .init(), initialRoute: RouteType? = nil)Parameters
initialRouteThe route to be triggered.
-
Creates a NavigationCoordinator and pushes a presentable onto the navigation stack right away.
Declaration
Swift
public init(rootViewController: RootViewController = .init(), root: Presentable)Parameters
rootThe presentable to be pushed.
View on GitHub
NavigationCoordinator Class Reference