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

查看:21
本文介绍了从白色 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!

我已经尝试了我在此处和开发论坛上找到的所有内容,包括调用 View controller-based status bar appearance = "NO" 以及 [[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天全站免登陆