草庐IT

capturePhoto

全部标签

ios - swift AVCapturePhotoOutput capturePhoto 挂起预览

以1080x1440分辨率显示预览;使用代码在iPhone8Plus上获取最大分辨率(3024x4032)和质量的照片:capturePhotoOutput?.capturePhoto(with:configurePhotoSettings(),delegate:self)照片设置:privatefuncconfigurePhotoSettings()->AVCapturePhotoSettings{letphotoSettings=AVCapturePhotoSettings()photoSettings.isHighResolutionPhotoEnabled=truephotoS

ios - 为什么在 AVCapturePhotoOutput 上调用 .capturePhoto(with :, delegate:) 会导致崩溃

几天来我一直在为这个错误而苦苦挣扎,如果我拍摄照片segue屏幕,关闭当前屏幕翻转相机并拍照应用程序崩溃并出现错误。[AVCapturePhotoOutputcapturePhotoWithSettings:delegate:]Noactiveandenabledvideoconnection'我已将错误缩小到三行代码,尽管我不确定如何修复它我相信该解决方案与我的AVCapturePhotoSettings这是我将故障代码缩小到的地方:@IBActionfunccameraButton_TouchUpInside(_sender:Any){letsettings=AVCapturePh