Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Commit

Permalink
[#277] - fix for crash on iOS switching cameras
Browse files Browse the repository at this point in the history
  • Loading branch information
timkim committed Aug 15, 2016
1 parent 7841f6d commit 6c3d74d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/ios/CDVBarcodeScanner.mm
Original file line number Diff line number Diff line change
Expand Up @@ -407,11 +407,12 @@ - (void)barcodeScanCancelled {
- (void)flipCamera {
self.isFlipped = YES;
self.isFrontCamera = !self.isFrontCamera;
[self barcodeScanDone:^{}];
if (self.isFlipped) {
self.isFlipped = NO;
}
[self barcodeScanDone:^{
if (self.isFlipped) {
self.isFlipped = NO;
}
[self performSelector:@selector(scanBarcode) withObject:nil afterDelay:0.1];
}];
}

//--------------------------------------------------------------------------
Expand Down

0 comments on commit 6c3d74d

Please sign in to comment.