Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/109.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios AVCaptureDevice微光增强swift_Ios_Swift_Xcode_Avcapturedevice - Fatal编程技术网

Ios AVCaptureDevice微光增强swift

Ios AVCaptureDevice微光增强swift,ios,swift,xcode,avcapturedevice,Ios,Swift,Xcode,Avcapturedevice,有人知道如何为ios摄像头应用程序设置微光增强吗?这是我的代码,但无法正常工作 let backCamera = AVCaptureDevice.defaultDevice(withMediaType: AVMediaTypeVideo) do { try backCamera?.lockForConfiguration() if (backCamera?.isLowLightBoostSupported == true)

有人知道如何为ios摄像头应用程序设置微光增强吗?这是我的代码,但无法正常工作

let backCamera = AVCaptureDevice.defaultDevice(withMediaType: AVMediaTypeVideo)
    do {
                try backCamera?.lockForConfiguration()
                if (backCamera?.isLowLightBoostSupported == true) {
                   backCamera?.automaticallyEnablesLowLightBoostWhenAvailable = true
                }
                 backCamera?.unlockForConfiguration()
                 }
                 catch{
                     print(error)
                 }

你不需要这个。将其放入didMoveToView:

captureSession!.sessionPreset = AVCaptureSessionPresetPhoto