设置状态条不隐藏
info.plist文件中,View controller-based status bar appearance项设为YES
- (UIStatusBarStyle)preferredStatusBarStyle
| { |
| return UIStatusBarStyleLightContent; |
| } |
|
|
| - (BOOL)prefersStatusBarHidden |
| { |
| return NO; |
}
设置视图控制器的边缘延伸
self .edgesForExtendedLayout = UIExtendedEdgeNone ;设置navigationBar有不透明背景图片时候,视图是否延伸到bar
self.extendedLayoutIncludesOpaqueBars = NO