什么是“约束边际”在Xcode 6.0.1中的Interface Builder中表示 [英] What does "Constrain to margins" mean in Interface Builder in Xcode 6.0.1

查看:141
本文介绍了什么是“约束边际”在Xcode 6.0.1中的Interface Builder中表示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我理解与最近邻居间隔的目的(在Xcode 6中,尤其是在Interface Builder中),但是约束到边距有什么意义?



与最近邻居的间距是特定控制按钮的边缘之间是否存在链接,同时检查名为约束到边距的复选框?



此功能在Autolayout中的作用是什么?



<请找一个带有复选框的屏幕截图,我正在谈论的标签下面用红色包围:





以上更大格式的屏幕截图



提前感谢您对我的三个问题的答案。

解决方案

iOS8引入了新的属性UIView: layoutMargins 。简而言之:这4个值( UIEdgeInsets )代表视图的边距:它的子视图现在可以相对于这些边距定位,或者相对于边的旧方式定位。
我在我的博客中写了一篇有关此内容的文章,详情请告诉我很明显,如果你有其他疑问。


I understand the purpose of "Spacing to the nearest neighbor" (in Xcode 6, more especially in Interface Builder) but what is the point of "Constrain to margins"?

Is there a link between "Spacing to the nearest neighbor" an edge of a particular control button, and the fact of at the same time checking the checkbox named "Constrain to margins"?

What is the role of this feature in Autolayout?

Please find a screenshot with the checkbox and the label that I am talking about surrounded in red below:

(Screenshot above in bigger format)

Thank you in advance for your answers to my three questions.

解决方案

iOS8 introduces a new property of the UIView: layoutMargins. Shortly: these 4 values (a UIEdgeInsets) represent the margins of the view: its subviews can now be positioned relative to these margins, or the old way relative to the sides. I wrote an article about this in my blog with more details, let me know if it is clear and if you have additional doubts.

这篇关于什么是“约束边际”在Xcode 6.0.1中的Interface Builder中表示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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