Knowledge summary of the IOS navigation controller
After adding the navigation controller:
1. Each page will have a top navigation bar Navigationbar and the bottom toolbar toolbar, which are the properties of the navigation controller NAVC. and the navigation bar is not hidden by default, while the bottom toolbar is hidden by default.
2. You can display the bottom toolbar by setting the self. Navigationcontroller. Toolbarhidden = No, and the contents of the toolbarcan be set by Viewcontroller's ToolbarItems. The order of the display is consistent with the order in which the settings are placed in the Nsarray, where each data is a Uibarbuttonitem object.
3. Navigation controls navigation bar Navigationbar and toolbar toolbar navigation buttons Navigationitem and ToolbarItems are the properties of the current Page view controller VC. Special note: The left Back button name of the next page is set by the Backbarbuttonitem of the current page. You can only set the name and cannot set the shape. If the next VC set Leftbarbuttonitem, then this page settings Backbarbuttonitem invalid, will be overwritten by the left button of the next page.
4. The name of the left back button on the next page is set by the previous controller Backbarbuttonitem. If the previous page does not have the name of the Backbarbuttonitem button set, the default display is back. However, if the previous page has the Navigationitem.title property set, the title is displayed. If Navigationitem.titleview is set on the previous page, the default back is still displayed on the left side of the next page.
5. The navigation controller will have a Viewcontrollers property, where the VC is organized as a stack, when pushviewcontroller or Addchildviewcontroller or directly added to the array navC2. Viewcontrollers = @[vc1,vc2,vc3]; Because a new page appears, you need to create an object that corresponds to the VC before Push,add. When using Poptoviewcontroller, the VC at the top of the stack will be destroyed (if you do not want to be destroyed, you need to give it a strong reference), the page returned does not need to create a new pop to the VC object, because the previous use of push, it was pressed into the bottom of the stack, and will not be destroyed.
6. Reprint a Good Article "Uinavigationcontroller use detailed ", we learn together.
Knowledge summary of the IOS navigation controller