UINavigationController

extension UINavigationController
  • Pushes the given view controller and calls the given closure upon completion.

    Declaration

    Swift

    public func push(_ viewController: UIViewController,
                     animated: Bool = true,
                     completion: (() -> Void)? = nil)

    Parameters

    viewController

    The view controller to push onto the stack.

    animated

    Specify true to animate the transition or false if you do not want the transition to be animated.

    completion

    The closure to be called upon completion.

  • Pops the top view controller and calls the given closure upon completion.

    Declaration

    Swift

    public func pop(animated: Bool = true,
                    completion: (() -> Void)? = nil)

    Parameters

    animated

    Specify true to animate the transition or false if you do not want the transition to be animated.

    completion

    The closure to be called upon completion.