UILabel属性&API汇总

1.设置文本及颜色

1
2
button.text = @"yifan";
button.textColor = [UIColor whiteColor];

2.UILabel居左/中/右对齐

1
2
3
_label.textAlignment = NSTextAlignmentLeft;
_label.textAlignment = NSTextAlignmentRight;
_label.textAlignment = NSTextAlignmentCenter;