gpt4 book ai didi

ios - 使用自定义相机覆盖 View 时底部的黑色 View (UIImagePickerController)

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:02:28 25 4
gpt4 key购买 nike

我想使用自定义相机叠加 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 时底部的黑色 View (UIImagePickerController),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20282936/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com