The principles of iOS three view switching are different

Source: Internet
Author: User

  • Uitabbarcontroller: The view is managed in a parallel manner, and the views are often not very large, and each view added to the Uitabbarcontroller is initialized, even if it is not currently displayed on the interface, which is relatively memory intensive.
  • Uinavigationcontroller: The view is managed on a stack, the switch of each view is the stack and the stack operation, the view after the stack is destroyed immediately.
  • Uimodalcontroller: Manages the view as a modal window, and the contents of other views cannot be manipulated until the current view is closed.

Uitabbarcontroller is an Apple specifically designed to take advantage of the tab switch view, which has a Uitabbar control in the view controller that the user clicks Tabbar to switch views. We know there is a view inside the Uiviewcontroller, and once the Uiviewcontroller is created, the view is displayed by default, but Uitabbarcontroller itself does not display any views. If you want to display a view, you must set its Viewcontrollers property (which shows viewcontrollers[0] by default). This property is an array that maintains a child view of all Uitabbarcontroller. In order to minimize the coupling between views, all Uitabbarcontroller related headings, icons and other information are controlled by the child view, Uitabbarcontroller only exist as a container.

The principles of iOS three view switching are different

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.