IOS UI Basics -11.0 Uinavigationcontroller

Source: Internet
Author: User

With Uinavigationcontroller, the navigation controller makes it easy to manage multiple controllers and easily switch between controllers, which is a typical example of the system's own "Setup" Application Uinavigationcontroller use steps
    • Initialize Uinavigationcontroller
    • Set the Rootviewcontroller for UIWindow to Uinavigationcontroller
    • Depending on the situation, add the corresponding number of sub-controllers by the push method
Use the push method to push a controller into the stack
-(void) Pushviewcontroller: (Uiviewcontroller *) Viewcontroller animated: (BOOL) animated;
Use the Pop method to remove the controller from the top of the stack
-(Uiviewcontroller *) popviewcontrolleranimated: (BOOL) animated;
Back to the specified child controller
-(Nsarray *) Poptoviewcontroller: (Uiviewcontroller *) Viewcontroller animated: (BOOL) animated;
Back to root controller (stack bottom controller)
-(Nsarray *) poptorootviewcontrolleranimated: (BOOL) animated;
The contents of the navigation bar navigation bar are determined by the Navigationitem property of the top controller, Uinavigationitem has the following properties affecting the contents of the navigation bar. The Back button in the upper-left corner
@property (Nonatomic,retain) Uibarbuttonitem *backbarbuttonitem;
The middle title view
@property (Nonatomic,retain) UIView *titleview;
Middle Caption text
@property (nonatomic,copy) NSString *title;
The view in the upper-left corner
@property (Nonatomic,retain) Uibarbuttonitem *leftbarbuttonitem;
Uibarbuttonitem *rightbarbuttonitem view in the upper right corner
@property (Nonatomic,retain) Uibarbuttonitem *rightbarbuttonitem;

IOS UI Basics -11.0 Uinavigationcontroller

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.