diff --git a/ios/CsZBar.m b/ios/CsZBar.m index a7a61f7..9d28c35 100644 --- a/ios/CsZBar.m +++ b/ios/CsZBar.m @@ -83,7 +83,7 @@ //[self.scanReader.view addSubview:polygonView]; } - [self.viewController presentModalViewController: self.scanReader animated: YES]; + [self.viewController presentViewController:self.scanReader animated:YES completion:nil]; } } @@ -100,6 +100,7 @@ - (void)imagePickerController:(UIImagePickerController*)picker didFinishPickingMediaWithInfo:(NSDictionary*)info { + if ([self.scanReader isBeingDismissed]) { return; } id results = [info objectForKey: ZBarReaderControllerResults]; ZBarSymbol *symbol = nil; for(symbol in results) break; // get the first result