我想使用自定义相机叠加 View 。下面是它的代码。
imagePicker = [[UIImagePickerController alloc] init];
self.imagePicker.delegate = self;
self.imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
self.imagePicker.showsCameraControls = NO;
self.imagePicker.cameraDevice = UIImagePickerControllerCameraDeviceFront;
self.imagePicker.toolbarHidden = YES;
self.imagePicker.wantsFullScreenLayout = YES;
self.imagePicker.navigationBarHidden = YES;
self.imagePicker.cameraOverlayView = [self cameraOverlayView];
问题是底部有黑色背景,我不知道它来自哪里。
代码有什么问题?
最佳答案
尝试全屏显示 cameraViewTransform。
CGFloat camScaleup = 2;
imagePicker.cameraViewTransform = CGAffineTransformScale(imagePicker.cameraViewTransform, camScaleup, camScaleup);
关于ios - 使用自定义相机叠加 View (UIImagePickerController)时底部的黑色 View ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/20282936/