问题描述
我正在为我工作的学校开发一个应用程序。目前我在将状态栏文本从默认状态的黑色更改为白色时遇到问题,所以我们实际上可以读取它!
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!
我已经尝试了我在这里找到的所有内容并在开发论坛上,包括调用查看基于控制器的状态栏外观=否
以及 [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
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];
推荐答案
我刚刚在我的某个应用中解决了这个问题。在你的UIViewController中实现它:
I just fixed this issue in one of my apps. Implement this in your UIViewController:
- (UIStatusBarStyle)preferredStatusBarStyle
{
return UIStatusBarStyleLightContent;
}
或者选择其他 UIStatusBarStyle
你需要的价值。
Or choose another UIStatusBarStyle
value that you need.
这篇关于从白色iOS 7 / Xcode 5更改状态栏文本颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!