UIIMagePickerController +相机+全屏捕捉照片

嗨,我用源types的摄像头使用UIImagePickerController 。 我想知道它不显示像iOS联系人应用程序(从照相机的个人资料照片)完全捕捉模式。

我的代码显示黑屏和iOS本机显示全屏幕的顶部和底部酒吧捕获相同的下一个重拍屏幕。

这是我的屏幕截图 在这里输入图像说明

 UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init]; imagePickerController.delegate = self; imagePickerController.mediaTypes = [NSArray arrayWithObjects:(NSString *)kUTTypeImage, nil]; imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera; imagePickerController.cameraCaptureMode = UIImagePickerControllerCameraCaptureModePhoto; UIView *controllerView = imagePickerController.view; controllerView.alpha = 0.0; controllerView.transform = CGAffineTransformMakeScale(0.5, 0.5); [[[[UIApplication sharedApplication] delegate] window] addSubview:controllerView]; [UIView animateWithDuration:0.3 delay:0.0 options:UIViewAnimationOptionCurveLinear animations:^{ controllerView.alpha = 1.0; } completion:nil]; 

我相信这是UIImagePickerController的默认行为(至less在某些设备上,在捕获区域附近有黑条)。

联系人应用程序可能只是在演示之前改变了它的-cameraViewTransform属性,用捕获视图填充整个屏幕,但是这个设置根据您要使用的设备和捕获质量而不同。