1.不要用titlelabel来设置textcolor,要用setTitleColor方法
官方原话:
Do not use the label object to set the text color or the shadow color. Instead, use the setTitleColor:forState:
and setTitleShadowColor:forState:
methods of this class to make those changes.
The titleLabel
property returns a value even if the button has not been displayed yet. The value of the property is nil
for system buttons.