【问题标题】:Status bar colour for UIImagePickerController [duplicate]UIImagePickerController 的状态栏颜色 [重复]
【发布时间】:2014-04-28 13:20:15
【问题描述】:

我们使用蓝色导航栏颜色和白色文本颜色:

但是,当我创建 UIImagePickerController 时,它会更改状态栏的颜色:

有什么解决方法吗?

【问题讨论】:

  • 非常感谢。我忽略了那个答案,因为它是关于隐藏状态栏的。但我的大脑正在考虑另一个问题。我刚刚使用了建议的注入,但使用了[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent]。这个对我有用。如有重复请关闭

标签: ios uiimagepickercontroller statusbar


【解决方案1】:

基于此处UIImagePickerController breaks status bar appearance 的回答。我用

修复了它
picker.delegate = self;

- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
}

【讨论】:

  • 将您的答案标记为已接受并投票结束您的问题
  • setStatusBarStyle 在 iOS 9 中已弃用
猜你喜欢
  • 2014-05-21
  • 2017-08-21
  • 1970-01-01
  • 2019-12-31
  • 2019-09-18
  • 1970-01-01
  • 2013-10-04
  • 1970-01-01
  • 2018-12-03
相关资源
最近更新 更多