Update storyboard to iOS 6 with backwards compatibility [duplicate]
Asked Answered
N

1

7

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.

Nadler answered 21/9, 2012 at 7:28 Comment(0)
O
15

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.

Picture highlighting springs and struts area of Interface Builder Size inspector

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.

Oldham answered 21/9, 2012 at 21:29 Comment(1)
This will have no effect unless you have ALSO upgraded your project to explicitly have a launch image for the extra-height iPhone5Nogas

© 2022 - 2024 — McMap. All rights reserved.