Classes
The following classes are available globally.
-
Animationis used to set presentation and dismissal animations for presentables.Depending on the transition in use, different properties of a
UIViewControllerare set to make sure the transition animation is used.See moreNote
To not override the previously set
Animation, usenilwhen initializing a transition.Make sure to hold a strong reference to the
Animationobject, as it is only held by a weak reference.Declaration
Swift
open class Animation : NSObject
-
AnyCoordinatoris a type-erasedCoordinator(RouteType&TransitionType) and can be used as an abstraction from a specific coordinator class while still specifying TransitionType and RouteType.See moreNote
If you do not want/need to specify TransitionType, you might want to look into the different router abstractionsStrongRouter,UnownedRouterandWeakRouter. SeeAnyTransitionPerformerto further abstract from RouteType.Declaration
Swift
public class AnyCoordinator<RouteType, TransitionType> : Coordinator where RouteType : Route, TransitionType : TransitionProtocol
-
AnyTransitionPerformer can be used as an abstraction from a specific TransitionPerformer implementation without losing type information about its TransitionType.
This type abstraction can be especially helpful when performing transitions. AnyTransitionPerformer abstracts away any implementation specific details and reduces coordinators to the capabilities of the
See moreTransitionPerformerprotocol.Declaration
Swift
public class AnyTransitionPerformer<TransitionType> : TransitionPerformer where TransitionType : TransitionProtocol
-
BaseCoordinator can (and is encouraged to) be used as a superclass for any custom implementation of a coordinator.
It is also encouraged to use already provided subclasses of BaseCoordinator such as
See moreNavigationCoordinator,TabBarCoordinator,ViewCoordinator,SplitCoordinatorandPageCoordinator.Declaration
Swift
open class BaseCoordinator<RouteType, TransitionType> : Coordinator where RouteType : Route, TransitionType : TransitionProtocol
-
BasicCoordinator is a coordinator class that can be used without subclassing.
Although subclassing of coordinators is encouraged for more complex cases, a
See moreBasicCoordinatorcan easily be created by only providing aprepareTransitionclosure, aninitialRouteand aninitialLoadingType.Declaration
Swift
open class BasicCoordinator<RouteType, TransitionType> : BaseCoordinator<RouteType, TransitionType> where RouteType : Route, TransitionType : TransitionProtocol
-
InteractiveTransitionAnimationprovides a simple interface to create interactive transition animations.An
InteractiveTransitionAnimationcan be created by providing the duration, the animation code and (optionally) a closure to create an interaction controller.See moreNote
To get further information read the UIKit documentation of UIViewControllerAnimatedTransitioning, UIViewControllerInteractiveTransitioning, UIViewControllerContextTransitioning and UIPercentDrivenInteractiveTransition.Declaration
Swift
open class InteractiveTransitionAnimation : NSObject, TransitionAnimation
-
Use InterruptibleTransitionAnimation to define interactive transitions based on the UIViewPropertyAnimator APIs introduced in iOS 10.
See moreDeclaration
Swift
@available(iOS 10.0, *) open class InterruptibleTransitionAnimation : InteractiveTransitionAnimation
-
NavigationAnimationDelegate is used as the delegate of a NavigationCoordinator’s rootViewController to allow for push-transitions to specify animations.
NavigationAnimationDelegate conforms to the
UINavigationControllerDelegateprotocol and is intended for use as the delegate of one navigation controller only.See moreNote
Do not override the delegate of a NavigationCoordinator’s rootViewController. Instead use the delegate property of the NavigationCoordinator itself.Declaration
Swift
open class NavigationAnimationDelegate : NSObject
-
NavigationCoordinator acts as a base class for custom coordinators with a
UINavigationControlleras rootViewController.NavigationCoordinator especially ensures that transition animations are called, which would not be the case when creating a
See moreBaseCoordinator<RouteType, NavigationTransition>.Declaration
Swift
open class NavigationCoordinator<RouteType> : BaseCoordinator<RouteType, NavigationTransition> where RouteType : Route
-
PageCoordinator provides a base class for your custom coordinator with a
UIPageViewControllerrootViewController.See moreNote
PageCoordinator sets the dataSource of the rootViewController to reflect the parameters in the initializer.Declaration
Swift
open class PageCoordinator<RouteType> : BaseCoordinator<RouteType, PageTransition> where RouteType : Route
-
PageCoordinatorDataSource is a UIPageViewControllerDataSource implementation with a rather static list of pages.
It further allows looping through the given pages. When looping is active the pages are wrapped around in the given presentables array. When the user navigates beyond the end of the specified pages, the pages are wrapped around by displaying the first page. In analogy to that, it also wraps to the last page when navigating beyond the beginning.
See moreDeclaration
Swift
open class PageCoordinatorDataSource : NSObject, UIPageViewControllerDataSource
-
RedirectionRouters can be used to extract routes into different route types. Instead of having one huge route and one or more huge coordinators, you can create separate redirecting routers.
Create a RedirectionRouter from a parent router by providing a reference to that parent. Triggered routes of the RedirectionRouter will be redirected to this parent router according to the provided mapping. Please provide either a
mapclosure in the initializer or override themapToParentRoutemethod.A RedirectionRouter has a viewController which is used in transitions, e.g. when you are presenting, pushing, or otherwise displaying it.
See more
-
SplitCoordinator can be used as a basis for a coordinator with a rootViewController of type
UISplitViewController.You can use all
See moreSplitTransitionsand get an initializer to set a master and (optional) detail presentable.Declaration
Swift
open class SplitCoordinator<RouteType> : BaseCoordinator<RouteType, SplitTransition> where RouteType : Route
-
StaticTransitionAnimationcan be used to realize static transition animations.See moreNote
Consider usingInteractiveTransitionAnimationinstead, if possible, as it is as simple to use. However, this class is helpful to make sure your transition animation is not mistaken to be interactive, if your animation code does not fulfill the requirements of an interactive transition animation.Declaration
Swift
open class StaticTransitionAnimation : NSObject, TransitionAnimation
-
StrongRouter is a type-erasure of a given Router object and, therefore, can be used as an abstraction from a specific Router implementation without losing type information about its RouteType.
StrongRouter abstracts away any implementation specific details and essentially reduces them to properties specified in the
Routerprotocol.See moreNote
Do not hold a reference to any router from the view hierarchy. UseUnownedRouterorWeakRouterin your view controllers or view models instead. You can create them using theCoordinator.unownedRouterandCoordinator.weakRouterproperties.
-
TabBarAnimationDelegate is used as the delegate of a TabBarCoordinator’s rootViewController to allow for transitions to specify transition animations.
TabBarAnimationDelegate conforms to the
UITabBarControllerDelegateprotocol and is intended for use as the delegate of one tabbar controller only.See moreNote
Do not override the delegate of a TabBarCoordinator’s rootViewController-delegate. Instead use the delegate property of the TabBarCoordinator itself.Declaration
Swift
open class TabBarAnimationDelegate : NSObject
-
Use a TabBarCoordinator to coordinate a flow where a
See moreUITabbarControllerserves as a rootViewController. With a TabBarCoordinator, you get access to all tabbarController-related transitions.Declaration
Swift
open class TabBarCoordinator<RouteType> : BaseCoordinator<RouteType, TabBarTransition> where RouteType : Route
-
ViewCoordinator is a base class for custom coordinators with a
See moreUIViewControllerrootViewController.Declaration
Swift
open class ViewCoordinator<RouteType> : BaseCoordinator<RouteType, ViewTransition> where RouteType : Route
View on GitHub
Classes Reference