设置UIButton里面titleLabel上的文字对齐的方法不是用:
button.titleLabel.textAlignment = UITextAlignmentCenter;
而是直接设置button对象的setContentHorizontalAlignment (水平方向)属性(垂直方向:UIControlContentVerticalAlignment),
button.ContentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;