iOS7 导航栏,view适配
导航控制器的navigationBar.barStyle = UIBarStyleBlack
后,导航栏默认透明。
为了达到全屏效果,官方为控制器增加了几个属性:
@property(nonatomic,assign) UIRectEdge edgesForExtendedLayout NS_AVAILABLE_IOS(7_0);
//Defaults to UIRectEdgeAll,edgesForExtendedLayout指上下左右边缘自适应来填满整个屏幕。
self.edgesForExtendedLayout = UIRectEdgeNone;
//进行以上设置后,控制器的原点坐标在导航栏的左下角。
@property(nonatomic,assign) BOOL automaticallyAdjustsScrollViewInsets NS_AVAILABLE_IOS(7_0);
//Defaults to YES.
@property(nonatomic,assign) BOOL extendedLayoutIncludesOpaqueBars;
//Defaults to NO, but bars are translucent by default on 7_0.