Pushes a view controller onto the receiver’s stack and updates the display.
- iOS 2.0+
- tvOS 9.0+
The view controller to push onto the stack. This object cannot be a tab bar controller. If the view controller is already on the navigation stack, this method throws an exception.
trueto animate the transition or
falseif you do not want the transition to be animated. You might specify
falseif you are setting up the navigation controller at launch time.
The object in the
view parameter becomes the top view controller on the navigation stack. Pushing a view controller causes its view to be embedded in the navigation interface. If the
animated parameter is
true, the view is animated into position; otherwise, the view is simply displayed in its final location.
In addition to displaying the view associated with the new view controller at the top of the stack, this method also updates the navigation bar and tool bar accordingly. For information on how the navigation bar is updated, see Updating the Navigation Bar.