1.使AppDelegate控制状态栏的改变
在info.plist中加View controller-based status bar appearance 设置为NO
2.在需要设置状态栏的地方设置
[UIApplicationsharedApplication].statusBarStyle=UIStatusBarStyleLightContent;
控制器控制状态栏的显示与隐藏
在info.plist中
View controller-based status bar appearance 设置为YES
然后在控制器中
-(BOOL)prefersStatusBarHidden{
return true;
}