will like to know how to fix this error.
i will
QRReader = [ZBarReaderViewController new];
[self presentViewController:QRReader animated:YES completion:nil];
in customoverlay i have a button that will call
[helpButton addTarget:self action:@selector(goToTips) forControlEvents:UIControlEventTouchUpInside];
-(void)goToTips
{
[QRReader performSegueWithIdentifier:@"scannerToTips" sender:self];
}
but when i pressed the button i will get this error
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver (<ZBarReaderViewController: 0x3c5350>) has no segue with identifier 'scannerToTips''
Ok there are some issues with the code...
So a proper call to seque would be:
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
ZBarReaderViewController *QRReader = [segue destinationViewController];
// So to hold a reference and pass any data
}
But in your case I'm guessing that you are not using a segue... So a code like this would be fine:
[helpButton addTarget:self action:@selector(goToTips) forControlEvents:UIControlEventTouchUpInside];
-(void)goToTips
{
QRReader = [ZBarReaderViewController new];
[self presentViewController:QRReader animated:YES completion:nil];
}
I hope that this helped...