iOS crash handling: This application was modifying the AutoLayout engine from a background thread

Source: Internet
Author: User

First, error hints

Today at the time of development encountered a crash problem, "This application is modifying the AutoLayout engine from a background thread, which can leads to engine C  Orruption and weird crashes. This would cause an exception in a future release. "

Second, the wrong wording

Let's take a look at the code's wording:

Iii. Causes of Errors

Later, after observing the code, it was discovered that the UI-caused crash was updated in the child thread. When we learn multithreading, we will certainly see a sentence: The UI must be updated in the main thread. This is the main cause of the crash, write code GCD related code must remember to update the UI operation must be placed in the main thread operation.

Iv. Methods of Solution

Now that you know to update the UI on the main thread, just add the code to the original code:

iOS crash handling: This application was modifying the AutoLayout engine from a background thread

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.