我有一個導航控制器,它們之間有一個叫做「addSegue」的segue鏈接。當我點擊tableView
細胞雖然應用程序崩潰,我得到的錯誤如下:'接收器(<ViewController>)沒有帶標識符'addSegue'的segue
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver (<MSAddFriendsViewController: 0x98cc340>) has no segue with identifier 'addSegue'
我不認爲我有我的代碼的任何問題。這是在我行showSegueWithIdentifier
方法:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSMutableSet *selectedUsers = [NSMutableSet set];
[self.tableView deselectRowAtIndexPath:indexPath animated:NO];
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
cell.accessoryType = UITableViewCellAccessoryCheckmark;
PFRelation *friendsRelation = [self.currentUser relationforKey:@"friendsRelation"];
PFUser *user = [self.allUsers objectAtIndex:indexPath.row];
[friendsRelation addObject:user];
[self.currentUser saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {
if (error) {
NSLog(@"Error %@ %@", error, [error userInfo]);
} }];
[self performSegueWithIdentifier:@"addSegue" sender:self];
}
Here is a picture of my storyboard
Here is an updated picture of my storyboard
檢查您在Storyboard中給出的Segue標識符。 –
清理項目並重試。 –
你應該在一個不需要人們看到它的權限的網站上發佈故事板的圖片。 – rdelmar