UILabel属性&API汇总

1.设置文本及颜色

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

2.UILabel居左/中/右对齐

_label.textAlignment = NSTextAlignmentLeft;
_label.textAlignment = NSTextAlignmentRight;
_label.textAlignment = NSTextAlignmentCenter;

你可能感兴趣的:(UILabel属性&API汇总)