Share via


NSLayoutAttribute 枚举

定义

用于基于约束的布局的属性枚举。

[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public enum NSLayoutAttribute
type NSLayoutAttribute = 
继承
NSLayoutAttribute
属性

字段

Baseline 11

不带下级的文本所在的行。

Bottom 4

元素的底部。

BottomMargin 16

元素底部的边距。

CenterX 9

元素的从左到右的中点。

CenterXWithinMargins 19

由元素边距限定的区域的 X 中心。

CenterY 10

元素的自上而下中点。

CenterYWithinMargins 20

由元素边距限定的区域的 Y 中心。

FirstBaseline 12

元素的第一个基线。

Height 8

沿 Y 轴的元素的大小。

LastBaseline 11

元素的最后一个基线。

Leading 5

在文本从右到左的区域设置中,此值等于 Left。 在希伯来语或阿拉伯语等区域设置中,等于 Right

LeadingMargin 17

元素边距的前边缘。

Left 1

元素最左侧的 X 值。

LeftMargin 13

元素的左边距。

NoAttribute 0

指示无属性。

Right 2

元素最右侧的 X 值。

RightMargin 14

元素的右边距。

Top 3

元素最上面的 Y 值。

TopMargin 15

元素的上边距。

Trailing 6

在文本从右到左的区域设置中,此值等于 Right。 在希伯来语或阿拉伯语等区域设置中,等于 Left

TrailingMargin 18

元素的尾随边距。

Width 7

沿 X 轴的元素的大小。

注解

用于在基于约束的布局中指定特定约束属性的值。 这些值主要由 类中 NSLayoutConstraint 的方法使用。

适用于

另请参阅