iOS7 无法隐藏状态栏

人气:393 发布:2022-10-16 标签: objective-c statusbar ios7

问题描述

I just upgraded my iPhone 5 iOS 7 to four beta version. Now when I run my app from Xcode 5 on this iPhone, status bar doesn’t hide, even though it should.

Not Working:

[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade];

Not Working:

[UIApplication sharedApplication].statusBarHidden = YES;

Can't login to Apple Developer Forums

解决方案

in your apps plist file add a row call it "View controller-based status bar appearance" and set it to NO

Note that this simply does not work, if you are using UIImagePickerController in the app.

from http://www.openfl.org/developer/forums/general-discussion/iphone-5ios-7-cant-hide-status-bar/, mgiroux's solution

611