NSLayoutAttribute Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
An enumeration of attributes for use with constraint-based layouts.
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public enum NSLayoutAttribute
type NSLayoutAttribute =
- Inheritance
-
NSLayoutAttribute
- Attributes
Fields
Name | Value | Description |
---|---|---|
NoAttribute | 0 | Indicates no attribute. |
Left | 1 | The left-most X value of the element. |
Right | 2 | The right-most X value of the element. |
Top | 3 | The top-most Y value of the element. |
Bottom | 4 | The bottom of the element. |
Leading | 5 | In locales with right-to-left text, this value is equal to Left. In locales such as Hebrew or Arabic, equal to Right. |
Trailing | 6 | In locales with right-to-left text, this value is equal to Right. In locales such as Hebrew or Arabic, equal to Left. |
Width | 7 | The size of the element along the X axis. |
Height | 8 | The size of the element along the Y axis. |
CenterX | 9 | The left-to-right midpoint of the element. |
CenterY | 10 | The top-to-bottom midpoint of the element. |
Baseline | 11 | The line on which text without descenders sits. |
LastBaseline | 11 | The element's last baseline. |
FirstBaseline | 12 | The element's first baseline. |
LeftMargin | 13 | The left margin of the element. |
RightMargin | 14 | The right margin of the element. |
TopMargin | 15 | The top margin of the element. |
BottomMargin | 16 | The margin from the bottom of the element. |
LeadingMargin | 17 | The leading edge of the element's margin. |
TrailingMargin | 18 | The trailing margin of the element. |
CenterXWithinMargins | 19 | The X-center of the region bounded by the element's margins. |
CenterYWithinMargins | 20 | The Y-center of the region bounded by the element's margins. |
Remarks
Values used to specify particular constraint attributes in constraint-based layouts. These values are primarily used by methods in the NSLayoutConstraint class.