5
votes

I have some issues with Status Bar Hidden logic.

I am having a flash screen before starting my game. In the flash screen controller, i use "[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];" under 'viewDidLoad' to hide the status bar and show the flash screen to occupy the entire iPhone screen.

Issue 1: It shows status bar for some fraction of seconds during my flash screen launch and then hides it. I don't want to get status bar even in the fraction of seconds also, it should just hide it once flash screen started. How to achieve it?

Issue 2: After the flash screen controller view, my game application home screen will be launched. If i use "[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];" under 'viewDidLoad' in Flash screen controller, it affects in my Game home screen view controller also. My game home screen controller also hides Status Bar. I don't want that. I want to hide the status bar only on flash screen, other views of my application should show status bar always. How to correct this?

Your suggestions are well appreciated.

1

1 Answers

5
votes

to make the status bar hidden during while your app launches, add the "status bar is initially hidden" key to your apps info plist.

then, in your first non-splash view, use

[[UIApplication sharedApplication] setStatusBarHidden:NO animated:NO];

in your viewDidLoad or viewDidAppear.