Adapting to the UI of a different size device:
Most of the time, our app may be running on different sizes of devices, or the display should not be the same. This requires that the location and size of the controls in the UI cannot be written to death.
For different sizes of UI adaptation, there are generally three countermeasures:
The worst-case: hard coding, to different devices, write different code layout.
Determine the other models in your code to set different positions for each control according to the different dimensions. or listen to the screen, in different states also set a different location and size.
This method is feasible, but the amount of work is very heavy, which makes the egg ache.
autoresizingmasks : It can only complete the relative position of the parent-child view. Instead of resolving the relative position between the sibling views.
Autoresizingmasks can be implemented either through code (enumeration), http://www.cocoachina.com/ios/20141216/10652.html
You can also do this through the visual interface of Xcode.
The best policy :AutoLayout , the relative positions of the parent-child view and the sibling view are resolved. The Blue line represents the constraint to determine the position of the control, and the orange representation does not fully determine the position of the control.
http://www.devtalking.com/articles/adaptive-layout-for-iphone6-1/
qf--adaptation to different size screens (Auto layout: AutoLayout)