![](/img/trans.png)
[英]How to expand camera view to full screen in swift - UIImagePickerController
[英]UIIMagePickerController + Camera + full screen capture photo
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
的默认行为(至少在某些设备上,捕获区域周围有黑条)。
Contacts应用程序可能只是在演示之前更改了它的-cameraViewTransform
属性,以使用捕获视图填充整个屏幕,但是此设置根据要使用的设备和捕获质量而有所不同。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.