有谁知道如何为你的ios相机应用设置低光增强?这是我的代码,但无法使其工作。
let backCamera = AVCaptureDevice.defaultDevice(withMediaType: AVMediaTypeVideo)
do {
try backCamera?.lockForConfiguration()
if (backCamera?.isLowLightBoostSupported == true) {
backCamera?.automaticallyEnablesLowLightBoostWhenAvailable = true
}
backCamera?.unlockForConfiguration()
}
catch{
print(error)
}
答案 0 :(得分:0)
你不需要那个。把它放在didMoveToView:
中captureSession!.sessionPreset = AVCaptureSessionPresetPhoto