更改初始屏幕 iOS 7 中的状态栏文本颜色 [英] Changing the status bar text color in splash screen iOS 7

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

问题描述

我知道已经有一些stackoverflow问题说明如何更改状态所有视图控制器的栏.我目前正在以这种方式更改状态栏的颜色:

I know that are already some stackoverflow questions that say how to change the status bar for all view controllers. I am currently changing the color of status bar this way:

if(IS_IOS7)
    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];

application:DidFinishLaunching

此外,我已将 plist 中 UIViewControllerBasedStatusBarAppearance 的值更改为 NO.但是,在启动画面中,它仍然以黑色显示状态栏文本.

Additionally, I have changed the value of UIViewControllerBasedStatusBarAppearance in the plist to NO. However, in the splashscreen it stills shows the status bar text with the black color.

是否可以更改启动画面中状态栏文本颜色的颜色?

Is it possible to change the color of the status bar text color in the splash screen?

推荐答案

在项目 plist 文件中添加状态栏样式"属性(键为 UIStatusBarStyle).然后忽略此属性的下拉列表中列出的所有可能值并键入 UIStatusBarStyleLightContent.

In the project plist file add the "Status Bar Style" property (key is UIStatusBarStyle). Then ignore all the possible values listed in the drop down for this property and type UIStatusBarStyleLightContent instead.

并且您不必在 plist 中将 UIViewControllerBasedStatusBarAppearance 设置为 NO,您可以将 preferredStatusBarStyle 设置为您的视图控制器.

And you don't have to set UIViewControllerBasedStatusBarAppearanceto NOin your plist, you can set the preferredStatusBarStyle you want to your view controllers.

这篇关于更改初始屏幕 iOS 7 中的状态栏文本颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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