Why is the Status Bar STILL showing during Default

2019-03-15 14:11发布

I'm pretty sure that I've taken all steps to correctly set my status bar to hidden. I did this in both the info.plist file (setting a UIStatusBarHidden to a boolean TRUE) as well as in the applicationDidFinishLaunching method in the Application Delegate using:

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

And the status bar does hide -- only not quick enough. Despite the steps taken above, when the app is launched, the status bar is STILL being displayed for about a second during the displaying of the Default.png default image. This looks tacky, and I want to make sure the status bar does not get displayed at any time during the running of the app.

Many apps I've tried ARE hiding the status bar successfully (doesn't even show during the display of default.png) but I can't figure out how. Anyone deal with this issue before?

6条回答
神经病院院长
2楼-- · 2019-03-15 14:36

I have seen this on Jailbroken devices using IOS 2.1 with an older version of Cydia. In that instance, once Cydia was updated, the info.plist + ...statusBarHidden = YES method worked.

Alternatively see if [application setStatusBarStyle: ...] helps.

-isdi-

查看更多
叛逆
3楼-- · 2019-03-15 14:38

UIStatusBarHidden should be set to true.

查看更多
相关推荐>>
4楼-- · 2019-03-15 14:39

Did you figure this out already? What I did to get it to work is edit the Info.plist file in TextMate rather than in Xcode. I added the following two lines:

<key>UIStatusBarHidden</key>
<true/>

I think the only thing different from the answers given above is that I used a text editor rather than Xcode. When you subsequently look at Info.plist in Xcode, you will see a check mark next to UIStatusBarHidden rather than a string. There is probably a way to do this directly in Xcode, but I don't know what it is.

查看更多
乱世女痞
5楼-- · 2019-03-15 14:40

I was seeing a similar problem on an iPod Touch 2G (3.1.3), where a black rectangle - same dimensions as the status bar - was showing above the default.png.

The solution to this problem involved making the default.png image 320x480 as opposed to its original 640x960. The exact solution was to make a default@2x.png using the larger dimensions.

查看更多
干净又极端
6楼-- · 2019-03-15 14:41

It's easier than that. At least in Xcode 4 you can simply add an entry "Status bar is initially hidden" to the plist and set its value to YES.

status bar entry in plist

查看更多
我只想做你的唯一
7楼-- · 2019-03-15 14:43

in the info.plist there's also a key called "Status bar is initially hidden" that needs to be checked on. It will hide the status bar while loading the default.png

查看更多
登录 后发表回答