Starting with IOS7, the system provides 2 ways to manage the status bar
Through Uiviewcontroller management (each uiviewcontroller can have its own different status bar)
Managed by UIApplication (the status bar of an application is unified by it)
In IOS7, by default, the status bar is managed by Uiviewcontroller, and Uiviewcontroller can easily manage the visibility and style of the status bar by implementing the following methods
Style of the status bar
-(Uistatusbarstyle) Preferredstatusbarstyle;
Visibility of the status bar
-(BOOL) Prefersstatusbarhidden;
If you want to use uiapplication to manage the status bar, you first need to modify the Info.plist settings
UIApplication *app = [UIApplication sharedapplication];
[App Setstatusbarhidden:yes Withanimation:uistatusbaranimationfade];
[App Setstatusbarstyle:uistatusbarstylelightcontent Animated:yes];
App.statusbarhidden = YES;
App.statusbarstyle = uistatusbarstylelightcontent;
IOS status bar