Interface Builder: What are the UIView's Layout iOS 6/7 Deltas for? Why does it not appear for AutoLayout? Ok then, what does it do? Does this exist if I like to code my interface by hand? Overall...
57
19
|
|||||
|
49
|
This actually refers to the Delta between layout position from iOS6 to iOS7. In iOS7, some views can hide the status bar or have it transparent and, in effect, it is overlaid on top of your view. So if you put a UI element at (0.0, 0.0) on iOS6, it will appear below the status bar, but on iOS7 it would appear partially covered underneath the status bar. So in that case you would want a delta that matches the status bar height (20.0 points) so that the layout looks the same in iOS6 and iOS7. I believe this isn't needed if you use autolayout, but of course, then you lose iPad1 support, which many of us aren't willing to concede at this point in time. |
||||||||
|
20
|
I know this is already been answered, just adding a small variant hoping it could also help those who don't use auto layout and still want to support iOS 6.1 and earlier versions. Read this Apple's Transition Guide - Supporting earlier version Choose 'View as' to 'iOS 7.0 and Later'
Base UI for iOS 7. For iOS 6 give suitable delta value. Use preview to see how this will render in iOS 7 and iOS 6 device.
Quick steps: Select each immediate children of root view individually and add 20px to its 'Y' value.
Then, select all immediate children collectively and give delta Y as -20px. You can also do this in batch or individually.
|
||||
|
8
|
AutoLayout requires at least iOS 6.0. If you want to support iOS 5.0 you couldn't use AutoLayout. And those deltas are used to help you adjust the view position on different iOS version(mainly iOS 7 and iOS version lower than 7).
I use those value to help me like this picture. |