UILabel
用于显示静态文本。通过 new UILabel(frame) 创建(必须传入 frame 参数),设置 text、textColor、font 等。
实例成员 (Instance members)
Section titled “实例成员 (Instance members)”属性(常用)
Section titled “属性(常用)”| 属性 | 类型 | 说明 |
|---|---|---|
text | string | 显示文本。 |
textColor | UIColor | 文本颜色。 |
font | UIFont | 字体(如 UIFont.systemFontOfSize(14))。 |
frame | CGRect | 位置与大小。 |
textAlignment | number | 对齐(如 1 居中;部分平台不可用,例如 xrOS 环境)。 |
numberOfLines | number | 行数(0 多行)。 |
类成员 (Class members)
Section titled “类成员 (Class members)”当前运行时未额外暴露 UILabel 的类成员。