I'm manually requesting a camera focus before I'm taking a picture in my app. I added an adjustingFocus observer to detect when the focusing has ended. When it's done I'm capturing the photo..
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
if( [keyPath isEqualToString:@"adjustingFocus"] ){
BOOL adjustingFocus = [ [change objectForKey:NSKeyValueChangeNewKey] isEqualToNumber:[NSNumber numberWithInt:1] ];
if (!adjustingFocus) {
[self captureStillImage];
}
}
}
The question is: is there a way to know if that focus succeeded and that I have a focused cam now? I know in Android it can be done, but till now I did not find a way to do it on iOS.
Thanks anyway.