How to show status bar initially hidden from plist

2019-04-27 12:32发布

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?

5条回答
ゆ 、 Hurt°
2楼-- · 2019-04-27 12:34

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

查看更多
手持菜刀,她持情操
3楼-- · 2019-04-27 12:38

SOLVED

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

using this at launch of app :)

查看更多
孤傲高冷的网名
4楼-- · 2019-04-27 12:44
[[UIApplication sharedApplication] setStatusBarHidden:NO animated:NO];
查看更多
爱情/是我丢掉的垃圾
5楼-- · 2019-04-27 12:53

OR

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

Just uncheck this property.

查看更多
我只想做你的唯一
6楼-- · 2019-04-27 12:57

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];
查看更多
登录 后发表回答