模态视图中的ios7状态栏会变回黑色吗? [英] ios7 status bar changing back to black on modal views?

查看:104
本文介绍了模态视图中的ios7状态栏会变回黑色吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我的应用程序设置,一切正常,直到我调用我的图像选择器和我的邮件控制器。在每个视图中,UIStatusBar变为黑色,即使我有

I have my app setup and everything works great until I call my image picker and my mail controller. On each of those views the UIStatusBar changes to black even though I have

[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];

并将基于控制器的状态栏外观设置为YES。

and View controller-based status bar appearance set to YES.

知道如何控制这些模态视图的浅色?看图像 - 第一个是整个应用程序,工作得很好。第二个是图像库显示后的图像选择器,第三个是邮件编辑器。

Any idea how to control the light color of these modal views? See the images - the first one is the entire app, working great. The second is the image picker after the image library is shown and the third is the mail composer.

任何帮助都将受到高度赞赏!

Any help would be highly appreciated!

推荐答案

我认为你需要把它放在提供模态控制器的视图控制器上

I think you need to put this on the view controller presenting the modal controller

- (UIStatusBarStyle) preferredStatusBarStyle { 
    return UIStatusBarStyleLightContent; 
}

这篇关于模态视图中的ios7状态栏会变回黑色吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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