Interface Builder:UIView的iOS 6/7 Deltas布局是什么? [英] Interface Builder: What are the UIView's Layout iOS 6/7 Deltas for?

查看:117
本文介绍了Interface Builder:UIView的iOS 6/7 Deltas布局是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚注意到在UIView的结构布局下找到了iOS 6/7 Delta属性。

I just noticed the iOS 6/7 Delta property found under the UIView's structs layout.

这是什么以及为什么AutoLayout缺少这个?

What is this for and why is this missing from AutoLayout?

推荐答案

这实际上指的是从iOS6到iOS7的布局位置之间的Delta。

This actually refers to the Delta between layout position from iOS6 to iOS7.

在iOS7中,某些视图可以隐藏状态栏或使其透明,实际上它覆盖在视图之上。因此,如果您在iOS6上放置(0.0,0.0)UI元素,它将显示在状态栏下方,但在iOS7上,它将显示在状态栏下方。因此,在这种情况下,您需要一个与状态栏高度(20.0点)匹配的增量,以便在iOS6和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.

我相信如果你使用自动布局不需要这个,但当然,你会失去iPad1的支持,我们很多人都不愿意在这一点上让步及时。

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.

这篇关于Interface Builder:UIView的iOS 6/7 Deltas布局是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆