Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Colors 如何更改状态栏的颜色?_Colors_Ios7_Uistatusbar - Fatal编程技术网

Colors 如何更改状态栏的颜色?

Colors 如何更改状态栏的颜色?,colors,ios7,uistatusbar,Colors,Ios7,Uistatusbar,我有一个简短的问题要问你。 是否可以更改iOS 7中状态栏的颜色(如Facebook应用程序) 是否也可以增加状态栏的透明度 提前谢谢大家,, 戴维 或者您也可以这样做: [UINavigationBar appearance].barTintColor = [UIColor redColor]; 如果应用程序中未显示导航栏。您可以更改导航栏颜色以更改状态栏颜色 [UINavigationBar appearance].barTintColor = [UIColor greenColor];

我有一个简短的问题要问你。 是否可以更改iOS 7中状态栏的颜色(如Facebook应用程序) 是否也可以增加状态栏的透明度

提前谢谢大家,, 戴维

或者您也可以这样做:

[UINavigationBar appearance].barTintColor = [UIColor redColor];

如果应用程序中未显示导航栏。

您可以更改导航栏颜色以更改状态栏颜色

[UINavigationBar appearance].barTintColor = [UIColor greenColor];

感谢您的快速回复,我必须将此代码放入viewDidLoad?是的,您可以将其放入viewDidLoad,但在此之前,您应该将两个图像作为大小为320x64的新图像和大小为320x44的先前图像。
[UINavigationBar appearance].barTintColor = [UIColor greenColor];