我用 ctrl 将 UITableViewController 连接到 NavigationController,将 segue 定义为“modal”并定义 segue 标识符“DetailEvent”。
在我的 UITableViewController 类中,我添加了以下代码:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSLog(@"Row Selected = %i",indexPath.row);
[self performSegueWithIdentifier:@"DetailEvent" sender:self.view];
}
错误:
Row Selected = 1
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver (<AvailableEventsController: 0xa335500>) has no segue with identifier 'DetailEvent''
*** First throw call stack:
(0x175b012 0x1580e7e 0x5aa492 0xa6b53fa 0x103a0 0x5778d5 0x577b3d 0xf7ee83 0x171a376 0x1719e06 0x1701a82 0x1700f44 0x1700e1b 0x23ee7e3 0x23ee668 0x4c865c 0xbf7d 0x2755)
libc++abi.dylib: terminate called throwing an exception
我在这里做错了什么?