ios – 如何制作UIImagePickerController StatusBar lightContent样式?

前端之家收集整理的这篇文章主要介绍了ios – 如何制作UIImagePickerController StatusBar lightContent样式?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
当我呈现 ImagePickerController时,statusBar文本颜色仍为黑色,如何制作这样的?

解决方法

只需三个步骤:

1:将UINavigationControllerDelegate,UIImagePickerControllerDelegate添加到您的

@interface yourController ()<>

2:imagePickerController.delegate = self;

3:

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

猜你在找的iOS相关文章