1、首先配置项目plist
(1)添加 View controller-based status bar appearance,并设置为NO
(2)添加 Status bar is initially hidden,并设置为YES
2、在UIImagePickerController使用的 ViewController中添加 navigationController: willShowViewController: animated:方法
- UIImagePickerController* imagePicker = [[UIImagePickerController alloc] init];
- imagePicker.delegate = self;
- - (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
- {
- [[UIApplication sharedApplication] setStatusBarHidden:YES];
- }