First, Uinavigationitem
1> How to get there
Self-Navigationitem //self refers to the controller
2> Role
Can be used to set the contents of the navigation bar at the top of the current controller
Set content in the middle of the navigation bar
Self. Navigationitem.title
Self. Navigationitem.titleview
Second, Uibarbuttonitem
1> Where to use
Set the contents of the upper-left corner of the navigation bar
Self. Navigationitem.leftbarbuttonitem
Set the contents of the upper right corner of the navigation bar
Self. Navigationitem.rightbarbuttonitem
2> Role
Equivalent to a button
Third, Uitabbaritem
1> How to get there
Self-Tabbaritem //self refers to the controller
2> Role
Can be used to set the contents of the tab label for the current controller
Title of the label
Self. Tabbaritem.title
Icon for the label
Self. Tabbaritem.image
Selected icon for the label
Self. Tabbaritem.selectdimage
Iv. Uinavigationbar
1. navigation bar at the top of the Controller (UI controls)
2. Uinavigationbar What is shown above, depending on the Navigationitem property of the current controller
3. Uinavigationbar is view, Navigationitem is model
4. provide the displayed data to Uinavigationbar by Navigationitem
Wu, Uitabbar
1. uitabbarcontroller tab strip at bottom
Liu, Uitabbarbutton
1. each label on the bottom of the Uitabbar
2. what is displayed in each Uitabbarbutton, depending on the Tabbaritem property of the current controller
3. Uitabbarbutton is view, Tabbaritem is model
4. provide the displayed data to Uitabbarbutton by Tabbaritem
Finally, put a picture to illustrate the use of the two ways:
The difference between Uinavigationitem and Uitabbaritem