toolbar is Uitoolbar, navigation bar uinavigationbar, tab bar Uitabbar. Their style is basically the same, the only difference is that the toolbar generally need to create themselves, and then add to the view, and the navigation bar and the tab bar do not need to create their own, They are generally attached to the navigation controller Uinavigationcontroller and the tab bar controller Uitabbarcontroler. In the navigation controller, there is a navigation bar, which is displayed, and a toolbar, which is hidden by default and can be enabled manually. The tab bar controller has only one tab bar. Below, I will be specific code to create a custom toolbar, navigation bar, tab bar.
The concrete examples are as follows:
1. Declaring properties
2. Encapsulation method
3. Call the method to create the project bar:
Creating toolbars
Create a navigation bar
Create a tab bar
Demo Result:
Above is the toolbar, the middle is the navigation bar, the following is the tab bar
IOS: Customizing toolbars, navigation bars, tab bars