我有一个名为ExploreViewController的RootView
这里我加载了一个带有[self.view addSubview:self.wallPostsTableViewController.view];
这工作正常,但现在我想点击一个单元格并打开该出售的详细信息,通常我在didSelectRowAtIndexPath中使用prepareToSegue和preformSegue ...
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
// call super because we're a custom subclass.
[super tableView:tableView didSelectRowAtIndexPath:indexPath];
[tableView deselectRowAtIndexPath:indexPath animated:YES];
[self performSegueWithIdentifier:@"ExploreModalSegue" sender:self];
}
和
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([segue.identifier isEqualToString:@"ExploreModalSegue"]) {
MuseumViewController *detailViewController = [segue destinationViewController];
NSInteger row = [[self tableView].indexPathForSelectedRow row];
detailViewController.detailItems = [self.objects objectAtIndex:row];
}
}
并且出错:
由于未捕获的异常'NSInvalidArgumentException'而终止应用程序,原因:'Receiver()没有带标识符'ExploreModalSegue'的segue''
我需要使用该单元格的正确信息调用detailViewController,并且我想将StoryBoard用于detailViewController?