iOS Development--Error summary & common errors and warnings in development summary (24)

Source: Internet
Author: User

Summary of common errors and warnings in development (24)AutoLayout appears under iOS8 ' Auto Layout still required after executing-layoutsubviews. ' The Bug

This is said this problem is also a year ago in the issue of the bug when the development has been on the iOS8, so bon voyage without any problems until one day a colleague holding his ios7.x iphone5s want me to help install a new development version and then use the process of the flash back A check is Title's error log

Auto Layout still required after executing-layoutsubviews.

-(void) layoutsubviews {    [super layoutsubviews];     // code to scroll the view
}

Another way is to make the default behavior of replacing layoutsubviews with the Swizzle method essentially the same as the solution idea

But no matter how you try, there's no way to solve my problem after my own groping and finally came to a solution

Method

In fact, the cause of the problem (or the solution) is simple and very painful.

Taking UITableView as an example causes this problem to occur because I add a custom subview on TableView (to be so simple) the solution to this problem is to remove the subview.

The same problem appears on the Uitextfield as well as the removal of Subview is ok (other native controls temporarily do not do a similar layout, so whether other controls have similar problems are not known if you encounter this problem can try to see if there is a custom subview)

I can't dig into the exact reasons, but it should be that the AutoLayout itself has a flaw in the iOS7 before the iOS8 fixes the problems (as many people in StackOverflow say)

iOS Development--Error summary & common errors and warnings in development summary (24)

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.