IOS: Customizing toolbars, navigation bars, tab bars

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.