iphone - NSAutoLayoutConstraints 中 Constraints 属性的含义

标签 iphone ios autolayout

我想在我的程序中使用约束。我想以编程方式创建它们。

所以任何人都可以帮我找出以下 NSLayout 属性的含义

NSLayoutAttributeLeft = 1,
NSLayoutAttributeRight,
NSLayoutAttributeTop,
NSLayoutAttributeBottom,
NSLayoutAttributeLeading,
NSLayoutAttributeTrailing,
NSLayoutAttributeWidth,
NSLayoutAttributeHeight,
NSLayoutAttributeCenterX,
NSLayoutAttributeCenterY,
NSLayoutAttributeBaseline,

谢谢。

最佳答案

https://developer.apple.com/library/ios/documentation/AppKit/Reference/NSLayoutConstraint_Class/NSLayoutConstraint/NSLayoutConstraint.html

查看常量部分。 一般这些是指 View 中应用约束关系的部分。 边缘很容易理解。 中心的很容易。 基线是用于以自然方式对齐包含文本的 View 。

关于iphone - NSAutoLayoutConstraints 中 Constraints 属性的含义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18327054/

相关文章:

iphone - UITableView 在滚动时移动单元格内容

iphone - 如何将 facebook 发布/消息时间转换为正常 NSDate

iphone - 以编程方式隐藏 UISplitview 的 masterDetailview

ios - ScrollView 限制一个边框

IOS:使用模态 ViewController 进行转换

ios - 带有 ContentInset 的 UICollectionView 没有一直向下滚动

ios - 使用自动布局时,旋转一圈后我没有得到正确的响应

iphone - 如何让 asl_log 出现在 iOS 系统控制台输出中?

ios - ASIHTTPRequest 错误域代码 1

ios - 使用自动布局以编程方式添加背景 ImageView