模态视图中的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;
}