简体   繁体   English

iOS 6中的状态栏颜色?

[英]Status bar color in iOS 6?

Is there any way to have this status bar in iOS 6? 有没有办法在iOS 6中拥有此状态栏?

In previous version of iOS, it has that status bar, but in iOS 6 it seems to follow the navigation bar color.. 在以前版本的iOS中,它具有该状态栏,但在iOS 6中它似乎遵循导航栏颜色..

状态栏

In iOS 6 the status bar color is now automatically determined by the navigation bar colors. 在iOS 6中,状态栏颜色现在由导航栏颜色自动确定。 To be specific the color is determined by the average color of the bottom pixel of the navigation bar as seen below: 具体来说,颜色取决于导航栏底部像素的平均颜色,如下所示: 在此输入图像描述

I am not sure if there is any other way to override this new operation. 我不确定是否有任何其他方法来覆盖此新操作。

[[UIApplication sharedApplication]setStatusBarStyle:UIStatusBarStyleBlackOpaque];

or 要么

[[UIApplication sharedApplication]setStatusBarStyle:UIStatusBarStyleBlackTranslucent];

are the options available apart from default 是默认情况下可用的选项

You can do it by change the status bar properties as follows: 您可以通过更改状态栏属性来执行此操作,如下所示:

1-Go to your project target. 1 - 转到项目目标。

2-Choose summary tap. 2 - 选择摘要点击。

3-Go to status bar section. 3 - 转到状态栏部分。

4-Customize it as you like. 4 - 根据需要自定义。

如何改变

I've found out in iOS6, you can not get gray "former default" style. 我在iOS6中发现,你不能得到灰色的“前默认”风格。 All parameter in info.plist and info.plist和中的所有参数

[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackTranslucent];
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackOpaque];

either setting can not give you light gray in iOS6. 在iOS6中,任一设置都不能给你浅灰色。 In iOS5, 在iOS5中,

[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];

This was what you needed. 这就是你所需要的。 So iOS6 eliminated gray bar style. 所以iOS6淘汰了灰条风格。

I suspect 'Default' doesn't necessarily give gray in iOS 6. 我怀疑“默认”并不一定会在iOS 6中显示灰色。

How about setting the custom tint to gray? 如何将自定义色调设置为灰色?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM