在启动画面iOS 7中更改状态栏文本颜色 [英] Changing the status bar text color in splash screen iOS 7

查看:137
本文介绍了在启动画面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];

应用程序中:DidFinishLaunching

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

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天全站免登陆