从白色 iOS 7 / Xcode 5 更改状态栏文本颜色
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18977160/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Change status bar text colour from white iOS 7 / Xcode 5
提问by Damian Worsdell
I'm developing an application for a school that I work at. Currently I am having issues with changing the status bar text from it's default state of black to white so we can actually read it!
我正在为我工作的学校开发应用程序。目前我在将状态栏文本从默认的黑色状态更改为白色时遇到问题,因此我们可以实际阅读它!
I have tried everything i've found here and on the dev forums, including calling View controller-based status bar appearance = "NO"
and also [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
我已经尝试了我在这里和开发论坛上找到的所有内容,包括打电话View controller-based status bar appearance = "NO"
和[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
回答by bneely
I just fixed this issue in one of my apps. Implement this in your UIViewController:
我刚刚在我的一个应用程序中解决了这个问题。在你的 UIViewController 中实现这个:
- (UIStatusBarStyle)preferredStatusBarStyle
{
return UIStatusBarStyleLightContent;
}
Or choose another UIStatusBarStyle
value that you need.
或者选择UIStatusBarStyle
您需要的另一个值。
回答by amb
You can use this in your AppDelegate:
你可以在你的 AppDelegate 中使用它:
[UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;
回答by kenmar
Here is a solution for your problem: How to change Status Bar text color in iOS 7.
这是您问题的解决方案: How to change Status Bar text color in iOS 7。