Problem: I can set the exposureMode property of AVCaptureDevice, but it does not stay locked.
Here is my code:
NSArray *devices = [AVCaptureDevice devices];
NSError *error;
for (AVCaptureDevice *device in devices) {
if (([device hasMediaType:AVMediaTypeVideo]) &&
([device position] == AVCaptureDevicePositionBack) ) {
if ([device isExposureModeSupported:AVCaptureExposureModeLocked]) {
device.exposureMode = AVCaptureExposureModeLocked;
NSLog(@"Exposure locked");
}
[device unlockForConfiguration];
}
}
I take 4 pictures one after another programmatically. The exposure stays locked in the first two pictures, but becomes unlocked in the last two. This happens when before locking the exposure I tap on a dark portion of the camera view so that part of the picture is over-exposed. It looks like iOS decides to do auto-exposure and override the exposure lock mode when the picture is overexposed.
thanks for the help,
this problem seem to have been fixed in iOS 5.