小编Mic*_*hKE的帖子

'Receiver(<ViewController>)没有带标识符'addSegue'的segue

我有一个导航控制器,它们之间有一个名为"addSegue"的segue链接.当我点击tableView单元格虽然应用程序崩溃,我得到以下错误:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver (<MSAddFriendsViewController: 0x98cc340>) has no segue with identifier 'addSegue'
Run Code Online (Sandbox Code Playgroud)

我认为我的代码没有任何问题.这是我有这条线的方法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];

}
Run Code Online (Sandbox Code Playgroud)

这是我的故事板的图片

这是我的故事板的更新图片

iphone objective-c ios uistoryboardsegue swift

11
推荐指数
3
解决办法
2万
查看次数

标签 统计

ios ×1

iphone ×1

objective-c ×1

swift ×1

uistoryboardsegue ×1