UITabBarController, navigation controller, and controller relationship,

Source: Internet
Author: User

UITabBarController, navigation controller, and controller relationship,

Similar to UINavigationController, UITabBarController can also be used to control multiple page navigation. You can move between multiple view controllers and customize the tab bar at the bottom of the screen.


With the tab bar at the bottom of the screen, UITabBarController does not have to push and launch views in stack mode as UINavigationController does, but instead sets up a series of controllers (they can be UIViewController and UINavigationController respectively, UITableViewController or any other type of View Controller), and add them to the tab bar so that each tab corresponds to a view controller.


UITabBarController is generally used as the rootViewController of the application, and cannot be used as the rootViewController of UINavigationController.


UITabBarController details: https://my.oschina.net/CarlHuang/blog/159995

 

The specific image is explained as follows:

 

 

 

1. UINavigationController is also a controller, but its control object is not a view. Instead, it indirectly controls the view by controlling UIViewController to achieve the link between various uiviewcontrollers and switch the business logic relationship. It is actually a container that stores all the UIViewController.


2. UIViewController is a UIView controller that loads views in loadview, loads, displays, eliminates, and animations on the UIView. It is actually a container that stores all the uiviews.


3. For example, if UIView is our programmer and the technical director is UIViewController, the manager is UINavigationController.


Conclusion: It may be Apple designed this idea.

 

Related Article

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.