ios7 status bar changing back to black on modal views? [duplicate]

非 Y 不嫁゛ 提交于 2019-12-10 16:42:58

问题


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];

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!


回答1:


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

- (UIStatusBarStyle) preferredStatusBarStyle { 
    return UIStatusBarStyleLightContent; 
}


来源:https://stackoverflow.com/questions/20895906/ios7-status-bar-changing-back-to-black-on-modal-views

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!