0

i have a UITableView and a second web view that i wish to move to when a cell is touched.

my problem is the program is crashing with

'NSInvalidArgumentException', reason: 'Receiver (<ViewController: 0x1e583890>) has no segue with identifier 'testing''
*** First throw call stack:
(0x326342a3 0x3a35197f 0x34647e31 0x78633 0x344fe28d 0x34580f81 0x32f42277 0x326095df 0x32609291 0x32607f01 0x3257aebd 0x3257ad49 0x361512eb 0x34490301 0x7724f 0x3a788b20)
libc++abi.dylib: terminate called throwing an exception

i have looked at every solution posted on here, tutorials and still cant see what is wrong.

I am new to story boards and iOS

here is some pieces of my code

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{

    [self performSegueWithIdentifier:@"testing" sender:self];
}

yes i do have a segue called "testing"

i tried commenting out [self performSegueWithIdentifier:@"testing" sender:self]; and using

-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{

if([segue.identifier isEqualToString:@"testing"]){
   NSLog(@"identifier is equal");
    webviewViewController *ViewController =segue.destinationViewController;
}

but when the cells were pressed then nothing happened, and @"identifier is equal" didnt show up in the log.

hope this helps

Reno Jones
  • 1,979
  • 1
  • 18
  • 30
Mark Gilchrist
  • 1,972
  • 3
  • 24
  • 44

3 Answers3

0

its telling that you not have the segue named "testing" . be sure of it,if you have mentioned segue, check for spelling.

else if you are not mentioned segue,plz mention it by clicking segue & writing name for it in inspector window

Ravindra Bagale
  • 17,226
  • 9
  • 43
  • 70
0

I've had this error before, and in fact this answer right here helped me out.

I had renamed my Storyboard and forgot to change it in the other necessary places. Make sure all of your information matches up correctly and that you're using the right version of your Storyboard.

Once you're done, make sure to uninstall the app on your simulator or device and retry.

Community
  • 1
  • 1
JMarsh
  • 934
  • 7
  • 19
0

ok i have found the problem, I had added a navigationcontroller to the ViewController in the app delgate file didfinishlaunchingithoptions, i had forgotten about this.

I have removed it and naturally it all works

thanks alot for all the answers

Mark Gilchrist
  • 1,972
  • 3
  • 24
  • 44