I'm trying to change the text on the DetailedViewController but every time I click on the cell I get this error. Any help is greatly appreciated.
* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver () has no segue with identifier 'MySegue''
This is how my code looks like.
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [feedsTableView cellForRowAtIndexPath:indexPath];
[self performSegueWithIdentifier:@"MySegue" sender:indexPath];
UILabel *title = (UILabel *)[cell.contentView viewWithTag:0011];
NSLog(@"TITLE; %@", title.text);
DetailViewController *nextView=[self.storyboard instantiateViewControllerWithIdentifier:@"detail"];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:0.75];
[self.navigationController pushViewController:nextView animated:NO];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.navigationController.view cache:NO];
[UIView commitAnimations];
}
This is my -prepareForSegue
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([[segue identifier] isEqualToString:@"MySegue"]) {
// Get destination view
DetailViewController *vc = [segue destinationViewController];
// Pass the information to your destination view
vc.title.text = @"lol";
}
}