When the system version number is higher than iOS7.0, then the original hidden status bar method may not be good to make. Because if you use the method of modifying plist to implement the hidden method, it still works.
Plist Method:Key:status Bar is initially hidden Value:yes since the program was opened, the status bar has been hidden Key:view controller-based status bar appearance value : YES After entering the program, the status bar is hidden.(that is, the Welcome screen default.png time to display the status bar)
Code Method:The disadvantage of the code method is that you cannot hide the status bar of the Welcome screen. Because the Welcome screen is turned on, Appdelegate has not executed didfinishlaunching.The advantage is that you can display the status bar in the specified Viewcontroller, just change the code's Yes to no
1-(BOOL) Application: (UIApplication *) application didfinishlaunchingwithoptions: (Nsdictionary *) launchoptions {2 //Override point for customization after application launch.3 if([Uidevice Currentdevice].systemversion.floatvalue <7.0) {4[UIApplication Sharedapplication].statusbarhidden =YES;5 }6 Else if([Self respondstoselector: @selector (setneedsstatusbarappearanceupdate)])7 {8 //iOS7 and above9 [self prefersstatusbarhidden];Ten //This is the update status bar display state, only support iOS7 and above, using Performselector is to not affect the main thread of other work One [Self performselector: @selector (setneedsstatusbarappearanceupdate)]; A } - returnYES; - } the --(BOOL) Prefersstatusbarhidden - { - returnYES;//Hide as Yes, show as no +}
IOS Hidden status bar