【发布时间】:2013-06-11 17:16:43
【问题描述】:
这可能需要两秒钟的时间来回答,但我的搜索技巧在这个问题上并没有让我走得太远。我正在执行 segue,但我不确定如何获取目的地的 id。这是我在 tableview 控制器上的代码。
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath: NSIndexPath *)indexPath{
NSLog(@"reaching accessoryButtonTappedForRowWithIndexPath:");
[self performSegueWithIdentifier:@"leads_calls_to_detail" sender:[[self.leads_calls objectAtIndex:indexPath.row] objectForKey:@"ID"]];
}
我必须在目标视图控制器上创建什么才能获取我试图传递的 id,或者我执行 segue 的方式与我正在尝试的不兼容?
【问题讨论】:
-
需要实现一个
prepareForSegue,其中可以参考segue.destinationController。
标签: ios objective-c cocoa-touch segue