Classes

The following classes are available globally.

  • Animation is used to set presentation and dismissal animations for presentables.

    Depending on the transition in use, different properties of a UIViewController are set to make sure the transition animation is used.

    Note

    To not override the previously set Animation, use nil when initializing a transition.

    Make sure to hold a strong reference to the Animation object, as it is only held by a weak reference.

    See more

    Declaration

    Swift

    open class Animation : NSObject
  • 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 TransitionPerformer protocol.

    See more

    Declaration

    Swift

    public class AnyTransitionPerformer<TransitionType> : TransitionPerformer where TransitionType : TransitionProtocol
  • BasicCoordinator is a coordinator class that can be used without subclassing.

    Although subclassing of coordinators is encouraged for more complex cases, a BasicCoordinator can easily be created by only providing a prepareTransition closure, an initialRoute and an initialLoadingType.

    See more

    Declaration

    Swift

    open class BasicCoordinator<RouteType, TransitionType> : BaseCoordinator<RouteType, TransitionType> where RouteType : Route, TransitionType : TransitionProtocol
  • NavigationAnimationDelegate is used as the delegate of a NavigationCoordinator’s rootViewController to allow for push-transitions to specify animations.

    NavigationAnimationDelegate conforms to the UINavigationControllerDelegate protocol and is intended for use as the delegate of one navigation controller only.

    Note

    Do not override the delegate of a NavigationCoordinator’s rootViewController. Instead use the delegate property of the NavigationCoordinator itself.
    See more

    Declaration

    Swift

    open class NavigationAnimationDelegate : NSObject
  • 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>.

    See more

    Declaration

    Swift

    open class NavigationCoordinator<RouteType> : BaseCoordinator<RouteType, NavigationTransition> where RouteType : Route
  • PageCoordinator provides a base class for your custom coordinator with a UIPageViewController rootViewController.

    Note

    PageCoordinator sets the dataSource of the rootViewController to reflect the parameters in the initializer.
    See more

    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 more

    Declaration

    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 map closure in the initializer or override the mapToParentRoute method.

    A RedirectionRouter has a viewController which is used in transitions, e.g. when you are presenting, pushing, or otherwise displaying it.

    See more

    Declaration

    Swift

    open class RedirectionRouter<ParentRoute, RouteType> : Router where ParentRoute : Route, RouteType : Route
  • SplitCoordinator can be used as a basis for a coordinator with a rootViewController of type UISplitViewController.

    You can use all SplitTransitions and get an initializer to set a master and (optional) detail presentable.

    See more

    Declaration

    Swift

    open class SplitCoordinator<RouteType> : BaseCoordinator<RouteType, SplitTransition> where RouteType : Route
  • StaticTransitionAnimation can be used to realize static transition animations.

    Note

    Consider using InteractiveTransitionAnimation instead, 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.
    See more

    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 Router protocol.

    Note

    Do not hold a reference to any router from the view hierarchy. Use UnownedRouter or WeakRouter in your view controllers or view models instead. You can create them using the Coordinator.unownedRouter and Coordinator.weakRouter properties.
    See more

    Declaration

    Swift

    public final class StrongRouter<RouteType> : Router where RouteType : Route
  • TabBarAnimationDelegate is used as the delegate of a TabBarCoordinator’s rootViewController to allow for transitions to specify transition animations.

    TabBarAnimationDelegate conforms to the UITabBarControllerDelegate protocol and is intended for use as the delegate of one tabbar controller only.

    Note

    Do not override the delegate of a TabBarCoordinator’s rootViewController-delegate. Instead use the delegate property of the TabBarCoordinator itself.
    See more

    Declaration

    Swift

    open class TabBarAnimationDelegate : NSObject
  • Use a TabBarCoordinator to coordinate a flow where a UITabbarController serves as a rootViewController. With a TabBarCoordinator, you get access to all tabbarController-related transitions.

    See more

    Declaration

    Swift

    open class TabBarCoordinator<RouteType> : BaseCoordinator<RouteType, TabBarTransition> where RouteType : Route