我在视图cameraOverlay上分配了一个自定义UIImagePickerDelegate(在本例中为 a UITabViewController)。
在委托方法中:
-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault animated:NO];
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone];
SelectPhotoTypeViewController *destinationController = [self.storyboard instantiateViewControllerWithIdentifier:@"SelectPhotoTypeView"];
destinationController.image = [info objectForKey:UIImagePickerControllerOriginalImage] forKey:@"image"];
[picker pushViewController:destinationController animated:YES];
}
当它运行时,它SelectPhotoTypeViewController被推送到(因为它继承自)。我在 中选择一种照片类型,然后用 推动a 。在此视图中,第一行隐藏在.NavigationControllerUIImagePickerUINavigationControllerSelectPhotoTypeViewControllerUIViewControllerUITableViewUITableViewUINavigationBar
这仅在从图库中选择图像(即拍照)时发生,cameraOverlay但在从图库中选择图像时不会发生。可能是什么原因?