Good afternoon!
Can you advise, I want to implement photo exposure fixing by clicking on photo preview point, at the moment I use DragGesture to get CGPoint and pass it to capture setup
let device = self.videoDeviceInput.device
do {
try device.lockForConfiguration()
if device.isFocusPointOfInterestSupported {
device.exposurePointOfInterest = focusPoint
device.exposureMode = .autoExpose
device.unlockForConfiguration()
}
}
The values are printed to the terminal, but in the preview it feels like one point closer to the bottom edge is being used.
The code for the view is:
.gesture(
DragGesture(minimumDistance: 0)
.onChanged({ value in
self.expFactor = value.location
print(expFactor)
})
.onEnded({ value in
model.exp(with: expFactor)
})
Can you tell me if anyone has already tried to implement the fixing in SwiftUI, I want it roughly like the standard camera.