Alright, so this is my first post on this website and I love the fact that this site is so popular. It provides great advice for new programmers. So I recently took up iOS programming and I have hit my first "unsolvable road block"
I am using xCode 4.3.3.
My setup/ problem:
I have a table view controller that has three cells: "all videos", "recent videos", "bookmarked videos". depending on the cell that was selected, a different table view controller loads. simple enough.
I have connected my segues from the table view controller itself to the other table view controllers and not from the prototype cells.
I have added the appropriate identifiers to each segue in my storyboard. "all", "recent", "bookmark".
my code for
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSString *titleOfCell= [[[tableView cellForRowAtIndexPath:indexPath]textLabel]text];
NSString *identifer;
if ([titleOfCell isEqualToString:@"Search All Videos"]) {
identifer=@"all";
}
if ([titleOfCell isEqualToString:@"Recently Viewed"]) {
identifer=@"recent";
}
if ([titleOfCell isEqualToString:@"Bookmarked"]) {
identifer=@"bookmark";
}
[self performSegueWithIdentifier:identifer sender:self];
}
. I run the code and click a cell and it gives me NSInvalidArgumentException', reason: 'Receiver () has no segue with identifier '_'
for every single cell! I'm tearing my hair out. Any ideas?? I have quadrupled checked for typos.