fix(focusWarning): fix focus depth warning being shown for ios.

This commit is contained in:
Joao Fidelis 2018-02-14 11:39:14 -02:00
parent 4b8a4246dd
commit 79698b815b

View File

@ -49,6 +49,7 @@ static NSDictionary *defaultFaceDetectorOptions = nil;
selector:@selector(orientationChanged:) selector:@selector(orientationChanged:)
name:UIDeviceOrientationDidChangeNotification name:UIDeviceOrientationDidChangeNotification
object:nil]; object:nil];
self.autoFocus = -1;
// [[NSNotificationCenter defaultCenter] addObserver:self // [[NSNotificationCenter defaultCenter] addObserver:self
// selector:@selector(bridgeDidForeground:) // selector:@selector(bridgeDidForeground:)
// name:EX_UNVERSIONED(@"EXKernelBridgeDidForegroundNotification") // name:EX_UNVERSIONED(@"EXKernelBridgeDidForegroundNotification")
@ -209,7 +210,7 @@ static NSDictionary *defaultFaceDetectorOptions = nil;
AVCaptureDevice *device = [self.videoCaptureDeviceInput device]; AVCaptureDevice *device = [self.videoCaptureDeviceInput device];
NSError *error = nil; NSError *error = nil;
if (device.focusMode != RNCameraAutoFocusOff) { if (self.autoFocus < 0 || device.focusMode != RNCameraAutoFocusOff) {
return; return;
} }