When the user changes the top-level view controller, whether by pushing or popping a view controller or changing the contents of the navigation stack directly, the navigation controller updates the navigation bar accordingly. Specifically, the navigation controller updates the bar button items displayed in each of the three navigation bar positions: left, middle, and right. Bar button items are instances of the UIBarButtonItem class. You can create items with custom content or create standard system items depending on your needs. For more information about how to create bar button items, seeUIBarButtonItem Class Reference.
Check the doc for detailed rules for the left, middle and right view updating.
A UINavigationBar object uses a stack to manage navigation items (instances of UINavigationItem) that represent a state of the navigation bar. You change the navigation bar by pushing navigation items using the pushNavigationItem:animated: method or popping navigation items using thepopNavigationItemAnimated: method. Methods with an animated: argument allow you to animate the changes to the display.
and some error:
2009-11-26 07:45:11.742 Flip[404:20b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Cannot call pushNavigationItem:animated: directly on a UINavigationBar managed by a controller.'
No comments:
Post a Comment