iOS一些细节坑点

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.

2.  [UIScreen mainScreen].bounds获取屏幕大小时在iPhone5上应该有一张 [email protected]以证明你的应用支持IPhone5否则无法获取到iPhone5的屏幕大小


你可能感兴趣的:(iOS一些细节坑点)