UINavigationController

public extension UINavigationController

NavigationController+Navigable is used to add additional support for navigation between storyboards.

Author

Adamas

Version

1.5.0

Date

06/09/2019
  • Push the initial view controller of a storyboard.

    Declaration

    Swift

    func showInitialViewController(ofStoryboard storyboardName: String,
                                   withAnimation shouldAnimate: Bool = true,
                                   initialization: ((UIViewController) -> Void) = { _ in })

    Parameters

    name

    The name of the storyboard.

    animate

    Whether animation should be performed or not.

    initialization

    Initialize the view controller.

  • Push a specific view controller within the storyboard.

    Declaration

    Swift

    func showViewController(ofStoryboard storyboardName: String? = nil,
                            withIdentifier identifier: String,
                            withAnimation shouldAnimate: Bool = true,
                            initialization: ((UIViewController) -> Void) = { _ in })

    Parameters

    storyboardName

    The name of the storyboard. Nil stands for current storyboard.

    identifier

    The id of the view controller.

    shouldAnimate

    Whether animation should be performed or not.

    initialization

    Initialize the view controller.