Possible Duplicate:
Enabling auto layout in iOS 6 while remaining backwards compatible with iOS 5
I'm going to update my app to the new 4 inches display and I figured out that I should check the Use Autolayout checkbox in the inspector. Doing this I loose the compatibility with iOs 5. How can i support the 4" display without loosing this back compatibility? Thank you so much.
You can use springs and struts to support both form factors without requiring iOS 6.0.
Springs and struts are easy to configure in the size inspector in Interface Builder. Just select any view and use the highlighted area of the inspector in the image shown below to configure how each view should resize with its parent.
Turning on a strut (the outer edge objects) indicates that the distance between that edge of the subview and the same edge of the parent should stay fixed. Turning on a spring (the inner arrow) indicates that the control should grow and shrink with the parent. In the picture above, the selected view is configured to stay pinned to the bottom, left, and right edges of its superview, and to grow with the width. The example area shows an animation of how the view would move and size with the parent.
The springs and struts area of the inspector is not available in documents that use auto layout.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With