TabBarCoordinator

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

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.

  • Use this delegate to get informed about tabbarController-related notifications and delegate methods specifying transition animations. The delegate is only referenced weakly.

    Set this delegate instead of overriding the delegate of the rootViewController specified in the initializer, if possible, to allow for transition animations to be executed as specified in the prepareTransition(for:) method.

    Declaration

    Swift

    public var delegate: UITabBarControllerDelegate? { get set }
  • Declaration

    Swift

    public override init(rootViewController: RootViewController = .init(), initialRoute: RouteType?)
  • Creates a TabBarCoordinator with a specified set of tabs.

    Declaration

    Swift

    public init(rootViewController: RootViewController = .init(), tabs: [Presentable])

    Parameters

    tabs

    The presentables to be used as tabs.

  • Creates a TabBarCoordinator with a specified set of tabs and selects a specific presentable.

    Declaration

    Swift

    public init(rootViewController: RootViewController = .init(), tabs: [Presentable], select: Presentable)

    Parameters

    tabs

    The presentables to be used as tabs.

    select

    The presentable to be selected before displaying. Make sure, this presentable is one of the specified tabs in the other parameter.

  • Creates a TabBarCoordinator with a specified set of tabs and selects a presentable at a given index.

    Declaration

    Swift

    public init(rootViewController: RootViewController = .init(), tabs: [Presentable], select: Int)

    Parameters

    tabs

    The presentables to be used as tabs.

    select

    The index of the presentable to be selected before displaying.