AddTabAction

@MainActor
public struct AddTabAction<ViewController> : ContainerAction where ViewController : UITabBarController

Integrates a UIViewController in to a UITabBarController

Properties

  • The index of the tab after which one a view controller should be added.

    Declaration

    Swift

    @MainActor
    public let tabIndex: Int?
  • The flag that tab should be replaced instead.

    Declaration

    Swift

    @MainActor
    public let replacing: Bool

Methods

  • Declaration

    Swift

    @MainActor
    public func perform(embedding viewController: UIViewController,
                        in childViewControllers: inout [UIViewController])
  • Declaration

    Swift

    @MainActor
    public func perform(with viewController: UIViewController,
                        on tabBarController: ViewController,
                        animated: Bool,
                        completion: @escaping (_: RoutingResult) -> Void)

Available where ViewController == UITabBarController

  • Adds a UIViewController to a UITabBarController

    • tabIndex: index of a tab.
    • replacing: should be set to true if an existing view controller should be replaced. If condition has not been passed, a view controller will be added after the latest one.

    Declaration

    Swift

    @MainActor
    static func addTab(at tabIndex: Int, replacing: Bool = false) -> TabBarControllerActions.AddTabAction<ViewController>
  • Adds a UIViewController to a UITabBarController

    • tabIndex: index of a tab. If condition has not been passed, a view controller will be added after the latest one.

    Declaration

    Swift

    @MainActor
    static func addTab(at tabIndex: Int?) -> TabBarControllerActions.AddTabAction<ViewController>
  • Adds a UIViewController to a UITabBarController А view controller will be added after the latest one.

    Declaration

    Swift

    @MainActor
    static var addTab: `Self` { get }