ios8 横屏状态栏不显示解决方法
2016-08-08 本文已影响2434人
hnxyzhw
开发过程中发现ios8下横屏状态栏不显示


Tips:解决这个问题,需要我们按照以下步骤操作
1:在plist文件中将 View controller-based status bar appearance 设置为NO

2:还需要application:didFinishLaunchingWithOptions:中添加以下下面代码(下面的两段代码必不可少)

[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone];
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone];