从白色iOS 7 / Xcode 5更改状态栏文本颜色 [英] Change status bar text colour from white iOS 7 / Xcode 5

查看:130
本文介绍了从白色iOS 7 / Xcode 5更改状态栏文本颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我工​​作的学校开发一个应用程序。目前我在将状态栏文本从默认状态的黑色更改为白色时遇到问题,所以我们实际上可以读取它!

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更改状态栏文本颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆