1. How to Use uinavigationcontroller
Uinavigationcontroller can be translated into a navigation controller, which is often used in IOS.
Let's see how it works:
The following figure shows the flow of the navigation controller. The root view is on the left. When you click the general item, the general view slides into the screen. When you continue to click the auto-lock item, the auto-lock view slides into the screen. Correspondingly, in object management, the navigation controller uses the navigation stack. The Root View Controller is at the bottom layer of the stack. The general view controller and auto-lock View Controller are used to import the Controller to the stack. You can call pushviewcontrolleranimated to push the View Controller to the top of the stack, or call popviewcontrolleranimated to bring the View Controller to the stack.
2. Structure of uinavigationcontroller
See, uinavigationcontroller consists of navigation bar, navigation view, and navigation toobar.
Here we will focus on
Uibarbuttonitem* Leftbutton = [[UibarbuttonitemAlloc]Initwithbarbuttonsystemitem:Uibarbuttonsystemitemactiontarget:SelfAction:@ Selector(Selectleftaction :)];
The uibarbuttonsystemitemaction style is the button style that comes with the system. You don't need to experiment one by one. You also know the item you want to use, for example: