how to hide status bar when splash screen appears in iphone?

Objective CIphoneXcodeSplash ScreenStatusbar

Objective C Problem Overview


Is there a way to hide the status bar when showing splash screen in iPhone and then show again in application?

Objective C Solutions


Solution 1 - Objective C

I'm pretty sure that if your Info.plist file has the Status bar is initially hidden value set to YES, then it won't show while your application is loading. Once your application has loaded, you can re-show the status bar using UIApplication's setStatusBarHidden:animated: method.

Solution 2 - Objective C

The correct key in .plist is "UIStatusBarHidden" and make checked right side.It'l become "Status bar is initially hidden" then automatically. In my practice, you can control the StatusBar's show/hide anywhere by when hide:

[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:NO];
[UIApplication sharedApplication].keyWindow.frame=CGRectMake(0, 0, 320, 480); //full screen.

when show:

[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:NO];
[UIApplication sharedApplication].keyWindow.frame=CGRectMake(0, 20, 320, 460); //move down 20px.

hope this was helpful to you.

Solution 3 - Objective C

View -> Property List Type -> iPhone Info.plist. Now, make a new item with "Status bar is initially hidden" checked.

Solution 4 - Objective C

Following up Dave's answer the key "Status bar is initially hidden" didn't work for me under iOS 4.3 BUT the key "UIStatusBarHidden" and then setting it's type to Boolean and checking the box did the trick.

http://developer.apple.com/library/ios/#documentation/general/Reference/InfoPlistKeyReference/Articles/AboutInformationPropertyListFiles.html#//apple_ref/doc/uid/TP40009254-SW4

This developer article got me onto the Info.plist keys and then working out the equivalent key for hiding it wasn't too hard.

Interestingly the "UIStatusBarStyle" needs to use the enumeration name as a string for it to work.

Solution 5 - Objective C

For Xcode 5 and above you can just set:

View controller-based status bar appearance to NO

In your info.plist, or in the info tab on your main project.

Example of Info settings in xcode

Solution 6 - Objective C

write this 1 line in to your main .m viewDidload method

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

or select info.plist file from your project supporting files folder in workspace

set statusbarinitialyhidden to YES

Solution 7 - Objective C

is deprecated

setStatusBarHidden:(BOOL) animated:(BOOL) 

is the correct

setStatusBarHidden:(BOOL) withAnimation:(UIStatusBarAnimation)

UIStatusBarAnimation which can be:

UIStatusBarAnimationNone or UIStatusBarAnimationFade or UIStatusBarAnimationSlide

Solution 8 - Objective C

This worked for me in the info.plist:

"View controller-based status bar appearance"  -> set to NO

Solution 9 - Objective C

Add Status bar is initially hidden to YES in the info.plist file. This worked for me.

status bar hidden

Solution 10 - Objective C

For XML editors ~ add to first child of

<key>UIStatusBarHidden</key>
<true/>

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionRahul VyasView Question on Stackoverflow
Solution 1 - Objective CDave DeLongView Answer on Stackoverflow
Solution 2 - Objective CMaxView Answer on Stackoverflow
Solution 3 - Objective CJonathan SterlingView Answer on Stackoverflow
Solution 4 - Objective CJosh PeakView Answer on Stackoverflow
Solution 5 - Objective CIan JamiesonView Answer on Stackoverflow
Solution 6 - Objective CUsmanView Answer on Stackoverflow
Solution 7 - Objective CJonathan Lamim AntunesView Answer on Stackoverflow
Solution 8 - Objective Cuser2588945View Answer on Stackoverflow
Solution 9 - Objective CVinoth VinoView Answer on Stackoverflow
Solution 10 - Objective CPaul BrewczynskiView Answer on Stackoverflow