- I create a
scrollView
using storyboard. - I programticaly created 10 myController(which are
UITableViewControllers
) inside thescrollViewController
, So I can usepanGesture
to switch between tables. and it's working fine. - I created a
tableViewController
using storyboard, set myController to be the corresponding view controller. - Embedded the
tableViewController
in navigation controller. - Control drag from table cell to a new view controller to create a push segue.
- Setup segue.
when running the app, prepareForSegue:
is never called.
Edit: After noticing this issue, I did the follow thing but with no luck.
I also set the segue identifier in storyboard correctly. and add the following code:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[self performSegueWithIdentifier:@"segueIdentifier" sender:self];
}
but when I tap any table cell on screen, program will crash with following error:
* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver () has no segue with identifier 'segueIdentifier'' * First throw call stack:
Why is that?
segueIdentifier
? The two have to be the same. Also make sure that you hit enter (or return) after typing otherwise it won't set. – CaptJak