Protocol: UINavigationBarDelegate

Overview

The UINavigationBarDelegate protocol defines optional methods that a UINavigationBar delegate should implement to update its views when items are pushed and popped from the stack. The navigation bar represents only the bar at the top of the screen, not the view below. It’s the application’s responsibility to implement the behavior when the top item changes.Tells the delegate that an item was popped from the navigation bar.Tells the delegate that an item was pushed onto the navigation bar.Returns a Boolean value indicating whether the navigation bar should pop an item.Returns a Boolean value indicating whether the navigation bar should push an item.

Instance Method Summary (collapse)

Instance Method Details

Tells the delegate that an item was popped from the navigation bar. If animating the pop operation, this method is invoked after the animation ends; otherwise, it is invoked immediately after the pop.

Parameters:

  • navigationBar (UINavigationBar)

    The navigation bar that the item is being popped from.

  • item (UINavigationItem)

    The navigation item that is being popped.

Returns:

Tells the delegate that an item was pushed onto the navigation bar. If pushing an item onto the navigation bar is animated, this method is invoked after the animation ends; otherwise, it is invoked immediately after the push.

Parameters:

  • navigationBar (UINavigationBar)

    The navigation bar that the item is being pushed onto.

  • item (UINavigationItem)

    The navigation item that is being pushed.

Returns:

Returns a Boolean value indicating whether the navigation bar should pop an item. Sent to the delegate before popping an item from the navigation bar.

Parameters:

  • navigationBar (UINavigationBar)

    The navigation bar that the item is being popped from.

  • item (UINavigationItem)

    The navigation item that is being popped.

Returns:

  • (Boolean)

    YES if the item should be popped; otherwise, NO.

Returns a Boolean value indicating whether the navigation bar should push an item. Sent to the delegate before pushing an item onto the navigation bar.

Parameters:

  • navigationBar (UINavigationBar)

    The navigation bar that the item is being pushed onto.

  • item (UINavigationItem)

    The navigation item that is being pushed.

Returns:

  • (Boolean)

    YES if the item should be pushed; otherwise, NO.