Unable to edit camera settings using AVCaptureDevice
Want to edit camera settings before photo capture using iPhone camera, I had used AVCaptureDevice class to edit camera setting, but new settings had not applied to camera and photo taken with random camera settings value. Why this camera setting values not changing, final image produced with some random values?
Find Framework and functions used for the same.
Is Apple dont allow to configure camera settings with custom values? I had checked apples sample app called AVCamValue which also give same result. For eg if we set ISO value 100, it takes 50 as input, and produce image with random value 80.
Framework - AVFoundation
static var myDevice:AVCaptureDevice! = nil
static func ISOValueChanged() {
do {
if ((try myDevice?.lockForConfiguration()) != nil) {
myDevice?.setExposureModeCustom(duration: AVCaptureDevice.currentExposureDuration, iso: 100, completionHandler: nil)
myDevice?.unlockForConfiguration()
}
}catch{}
}