Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.

Commit

Permalink
fix(focusWarning): fix focus depth warning being shown for ios.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgfidelis committed Feb 14, 2018
1 parent 4b8a424 commit 79698b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ios/RN/RNCamera.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ - (id)initWithBridge:(RCTBridge *)bridge
selector:@selector(orientationChanged:)
name:UIDeviceOrientationDidChangeNotification
object:nil];
self.autoFocus = -1;
// [[NSNotificationCenter defaultCenter] addObserver:self
// selector:@selector(bridgeDidForeground:)
// name:EX_UNVERSIONED(@"EXKernelBridgeDidForegroundNotification")
Expand Down Expand Up @@ -209,7 +210,7 @@ - (void)updateFocusDepth
AVCaptureDevice *device = [self.videoCaptureDeviceInput device];
NSError *error = nil;

if (device.focusMode != RNCameraAutoFocusOff) {
if (self.autoFocus < 0 || device.focusMode != RNCameraAutoFocusOff) {
return;
}

Expand Down

0 comments on commit 79698b8

Please sign in to comment.