Statusbar出现透明及界面下方出现空白

步骤1、在ViewController中 loadView  

 

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000  

if ( IOS7_OR_LATER )  

{  

self.edgesForExtendedLayout = UIRectEdgeNone;  

self.extendedLayoutIncludesOpaqueBars = NO;  

self.modalPresentationCapturesStatusBarAppearance = NO;  

}  

#endif  #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000  

 

步骤2 在AppBoard_iPhone.m中加入  

 

- (UIStatusBarStyle)preferredStatusBarStyle {  

return UIStatusBarStyleLightContent;  

}  

 

- (BOOL)prefersStatusBarHidden {  

return YES;  

原文地址:https://www.cnblogs.com/zhaozhongpeng/p/4867733.html