iOS development Bug--view is a bug that lazy loading leads to a mistake of UI loading

Source: Internet
Author: User

Although classified as a bug, it is also counted as a problem, a very simple question. First look at the recurrence of the problem, wrote a simple demo verification effect:

Question: Click Viewcontroller to jump to Twoviewcontroller, and find that it will delay before it appears.

This problem is also encountered in my work development, at first I do not know what the reason. Later found as long as the Twoviewcontroller in the:

The line of code that the arrow points to is removed, or a line of any action on any view, such as setting the title, setting the background color, adding a view, and so on, can avoid the problem that I encountered on Apple native.

Explanation: In fact, this is not a big problem, the reason is that Apple's operating mechanism is lazy loading, because in the Viewdidload method if there is no any view operation, lazy loading will make the view load delay, there will be the above controller jump words effect.

iOS development Bug--view is a bug that lazy loading leads to a mistake of UI loading

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.