yannickl / QRCodeReaderViewController

Simple QRCode reader for iOS 7 and over
MIT License
628 stars 164 forks source link

UIStoryboard #33

Open kishorehvk opened 7 years ago

kishorehvk commented 7 years ago

Hi ,

Instead of dismisViewController in didScanresult method I need to use UIStoryboard storyboard= [UIStoryboard storyboardWithName:@"Main" bundle:nil]; UIViewController main = [storyboard instantiateViewControllerWithIdentifier:@"MainViewController"]; [self presentViewController:main animated:YES completion:nil]; But it is not pushing into the respective view controller. How could I do it

yannickl commented 7 years ago

Hi @kishorehvk,

If you try to present a view controller while another one is already displayed it'll not work. You need first to dismiss the current presented view controller then to display the new one. Or just present the new view controller into the QRCodeReaderViewController instance instead of self.

kishorehvk commented 7 years ago

My question is,I have View Controller VC, When i start to scan it opens a new viewController lets say VC 2 and in that new viewcontroller it opens the camera. If I dismiss it, only the camera goes and the view controller remains idle. But i need to go back to view VC.

yannickl commented 7 years ago

You have a VC1 that opens the QRCodeReaderViewController (VC2) with its camera? And when you try to dismiss the VC2 your VC2 is always here?

If you follow the example in the README or in the example project this is the same behaviour that you want to achieve.