How to show status bar initially hidden from plist iphone

冷暖自知 提交于 2020-01-23 06:29:08

问题


i want to hide the status bar when i launch my app to view launch image that was covered by status bar. so in plist i added

Status bar is initially hidden YES

and status bar is covered. My problem is that status bar is covered always in my app, i want to hide status bar only for launch image, what can i do?


回答1:


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



回答2:


SOLVED

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

using this at launch of app :)




回答3:


you can do this by adding property, "Status bar Initially Hidden" to plist as shown below : -




回答4:


OR

you can also set the (Status bar Initially Hidden)Property to "NO" in Info.plist file in your Application.

Just uncheck this property.




回答5:


Neither Niko's nor JackTurky's solutions are correct. Niko's:

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

...works but is deprecated. Correct in iOS 3.2 and later is:

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


来源:https://stackoverflow.com/questions/8531989/how-to-show-status-bar-initially-hidden-from-plist-iphone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!