Reprinted from Http://www.cnblogs.com/lovecode/articles/2234557.html
State Bar Status Bar
[UIApplication Sharedapplication].statusbarhidden = YES;
Or
ios3.2+ Support
[Application Setstatusbarhidden:no Withanimation:uistatusbaranimationfade];
The Statusbarhidden property supports the ios2.0+,setstatusbarhidden:animated: Method starts canceling in iOS3.2 and uses the setstatusbarhidden:withanimation: Method.
The above method can only be implemented when the program skips loading (that is, the splash screen) to hide the status bar. If you want to hide the status bar at the beginning of the splash screen, to modify the app's Info.plist file, add the Uistatusbarhidden key (status bar is initially hidden) with the value Yes.
similarly: for the color change of the status bar, you also have to start from two places, the Code [[uiapplicationsharedapplication] Setstatusbarstyle: Uistatusbarstyleblackopaque]; just change the status bar on the view after the splash screen, to make the app change the default color when the splash screen To modify the Info.plist file, add the Uistatusbarstyle key (Status bar style) with a value of opaque black style, Transparent black style, and the default gray style.
Nav Bar Navigation Bar
[Self.navigationcontroller Setnavigationbarhidden:yes];
tab Tabbar
Method One:
[Self.tabBarController.tabBar Sethidden:yes];
Problem with this method: Although the Tabbar bar is hidden, the area becomes a blank space and cannot be used by other views.
Method Two:
For the structure of Navigationcontroller+tabbarcontroller, You can set the Hidesbottombarwhenpushed property of Childcontroller to Yes before you push the next level of Childcontroller. For example, you can do this in the Childcontroller initialization method, with the following code:
3
4
5 //Custom initialization.
6 self.hidesbottombarwhenpushed = YES;
7
8 return self;
9}
Method Three:
View Code
Time
2 {
3 [self setfullscreen:yes];
5-(void) Viewwilldisappear: (BOOL) animated
6 {
7 [self setfullscreen:no];
8
9
10 {
One//status bar
[UIApplication sharedapplication].statusbarhidden = fullscreen;
//navigation bar
[Self.navigationcontroller Setnavigationbarhidden:fullscreen];
/ /Tabbar Hide by setting the Hidesbottombarwhenpushed property in the initialization method to implement the
+ }
How to hide various bar in iOS development