How to hide status bar when splash screen appears on iphone?

Is there a way to hide the status bar when displaying a splash screen on iPhone and then show it again in the app?

+84
objective-c iphone xcode statusbar
Jul 18 '09 at 14:40
source share
11 answers

I am sure that if your Info.plist file has the Status bar is initially hidden value set to YES , it will not be displayed at boot time of your application. After loading the application, you can re-display the status bar using the UIApplication setStatusBarHidden:animated: method.

+190
Jul 18 '09 at 14:52
source share

The correct key in the .plist is "UIStatusBarHidden" and make the correct checkbox. After that, the “Status bar is hidden first” and then automatically. In my practice, you can control the show / hide of the StatusBar anywhere when hide:

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

when shown:

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

Hope this was helpful to you.

+48
Jul 06 '11 at 2:12
source share

View → Object List Type → iPhone Info.plist. Now make a new item with the "Hidden Status Bar".

+23
Aug 29 '09 at 21:56
source share

After Dave’s answer, the answer “Status bar is initially hidden” doesn’t work for me in iOS 4.3, but the key is “UIStatusBarHidden” and then set it to Boolean, and checking the checkbox did the trick.

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

In this developer article, I got Info.plist keys, and then working out an equivalent key to hide, it was not too difficult.

Interestingly, "UIStatusBarStyle" needs to use the enumeration name as a string for its operation.

+6
Jun 29 2018-11-11T00:
source share

For Xcode 5 and above, you can simply install:

View controller status bar status to NO

In your info.plist file or on the info tab of your main project.

Example of Info settings in xcode

+5
Apr 09 '14 at 9:11
source share

write this 1 line in your main method .m viewDidload

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

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

set statusbarinitialyhidden to YES

+3
May 18 '12 at 6:54 am
source share

outdated

 setStatusBarHidden:(BOOL) animated:(BOOL) 

is right

 setStatusBarHidden:(BOOL) withAnimation:(UIStatusBarAnimation) 

UIStatusBarAnimation , which may be:

UIStatusBarAnimationNone or UIStatusBarAnimationFade or UIStatusBarAnimationSlide

+2
Feb 03 2018-12-12T00:
source share

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

status bar is hidden

+1
Jul 07 '17 at 12:16
source share

For XML editors ~ add to first child

 <key>UIStatusBarHidden</key> <true/> 
0
Aug 21 '13 at 20:00
source share

This worked for me in info.plist:

 "View controller-based status bar appearance" -> set to NO 
0
04 Oct '13 at 9:53 on
source share

In iOS 10 (beta 8), if the Status bar is initially hidden parameter Status bar is initially hidden set to YES , the pop-up view is displayed without a status bar, and it becomes visible automatically after the splash image disappears, there is no need to encode.

Note I use Apple's recommended way to show a splash: storyboard and am not sure if this will work with startup images.

-one
Aug 30 '16 at 22:48
source share



All Articles