保持UIImagePickerController后导航栏风格统一

时间:2021-08-10 22:32:49

1. UIImagePickerController 状态栏始终保持某一种风格.

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

}

-(void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated{

[[UIApplication  sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackOpaque];

}

2:修改 UIImagePickerController 顶部导航栏的颜色风格