For the AutoLayout problem that only occurs in iOS7, you should seriously doubt whether it is a constraint to Margin problem. iOS8 and above will have a constraint to Margin by default, which is 8px wide on a 4.7-inch screen, but iOS7 does not support it. Especially for the hand-draged autolayout variable, special attention should be paid to it. If it contains constraint to margin, the displayed value is 10, but in fact it is 18px in iOS7.
If you are still using frame for interface layout through code, but are tired of position calculation and screen size; if you are using AutoLayout for interface layout, but it is difficult to control and update the constraints, and your constraint code has increased your Code amount; if you want your IOS6 version of the application to also have the sizeClass function; then please use this set of layout libraries:
https://github.com/youngsoft/MyLinearLayout
This layout library is based on Android's linear layout, relative layout, frame layout, and table layout. At the same time, it has the AutoLayout function of IOS, some SIZECLASS functions, and the UIStackView function in IOS9. It refers to some syntax mechanisms of masonry, but it can run in the IOS5 version of the application. It is simple and convenient to use, the code is clear and less. And it comes with four tutorial documents:
There must be something wrong with the constraints, you'd better print out the view constraints problem.
Try outputting autolayout information on the view:
See if there is any
AMBIGUOUS LAYOUT
.For the AutoLayout problem that only occurs in iOS7, you should seriously doubt whether it is a constraint to Margin problem. iOS8 and above will have a constraint to Margin by default, which is 8px wide on a 4.7-inch screen, but iOS7 does not support it. Especially for the hand-draged autolayout variable, special attention should be paid to it. If it contains constraint to margin, the displayed value is 10, but in fact it is 18px in iOS7.
Trouble this problem first.
If you are still using frame for interface layout through code, but are tired of position calculation and screen size; if you are using AutoLayout for interface layout, but it is difficult to control and update the constraints, and your constraint code has increased your Code amount; if you want your IOS6 version of the application to also have the sizeClass function; then please use this set of layout libraries:
This layout library is based on Android's linear layout, relative layout, frame layout, and table layout. At the same time, it has the AutoLayout function of IOS, some SIZECLASS functions, and the UIStackView function in IOS9. It refers to some syntax mechanisms of masonry, but it can run in the IOS5 version of the application. It is simple and convenient to use, the code is clear and less. And it comes with four tutorial documents:
http://blog.csdn.net/yangtiang/article/details/48011431 Table layout