开发者

iPhone:Problem with hiding/showing status bar in multiple view controller

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 second开发者_Python百科s 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜