0

I want to use constraints in my program. I want to create them programmatically .

So can anybody please help me to find out the meaning of following NSLayout Attributes

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

thank you.

4

1 回答 1

2

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

Look under the section Constants. Generally these refer to the part of the view to apply the constraint relationship. The edges are pretty easy to understand. The center ones are pretty easy. The baseline one is for aligning views containing text in a natural way.

于 2013-08-20T05:10:11.613 回答