Я хочу создать функциональность фокуса так же, как и собственное приложение для камеры, использующее AVCam, но неспособный создать его. Я использую приведенный выше код:Фокус с использованием AVCam, например, встроенного приложения для камеры
if ([[[captureManager videoInput] device] isFocusPointOfInterestSupported]) {
CGPoint tapPoint = [tgr locationInView:[self videoPreviewView]];
CGPoint convertedFocusPoint = [self convertToPointOfInterestFromViewCoordinates:tapPoint];
[self addLayoutsOfAutoFocus:tapPoint];
[USERDEFAULTS setValue:[NSString stringWithFormat:@"%f",convertedFocusPoint.x] forKey:x_value];
[USERDEFAULTS setValue:[NSString stringWithFormat:@"%f",convertedFocusPoint.y] forKey:y_value];
[USERDEFAULTS synchronize];
[captureManager continuousFocusAtPoint:convertedFocusPoint];
[captureManager continuousExpousureAtPoint:convertedFocusPoint];
}
я пытаюсь сохранить точку фокусировки, но в следующий раз, когда я перезагрузить камеру фокус теряется.
Пожалуйста, помогите.