Hong Xiaoyao Xue iOS-uinavigationcontroller

Source: Internet
Author: User

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:

 

 

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.