Change deprecated photo resolution code
This commit is contained in:
parent
9a6859686c
commit
0e2b0b42ff
@ -115,7 +115,13 @@ class CameraManager: ObservableObject {
|
||||
return
|
||||
}
|
||||
session.addOutput(photoOutput)
|
||||
photoOutput.isHighResolutionCaptureEnabled = true
|
||||
let maxFormat = camera.formats
|
||||
.reduce(into: []) { $0.append(contentsOf: $1.supportedMaxPhotoDimensions) }
|
||||
.max { $0.width * $0.height < $1.width * $1.height }
|
||||
if let maxFormat {
|
||||
photoOutput.maxPhotoDimensions = maxFormat
|
||||
}
|
||||
//photoOutput.isHighResolutionCaptureEnabled = true
|
||||
photoOutput.isDepthDataDeliveryEnabled = false
|
||||
photoOutput.isLivePhotoCaptureEnabled = false
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user