设置UIButton上字体的对齐方式,不是用:
[button.titleLabel setTextAlignment:UITextAlignmentCenter];
而是用:
[button setContentHorizontalAlignment:UIControlContentHorizontalAlignmentCenter];//居中
设置UIButton上字体的对齐方式,不是用:
[button.titleLabel setTextAlignment:UITextAlignmentCenter];
而是用:
[button setContentHorizontalAlignment:UIControlContentHorizontalAlignmentCenter];//居中