我有一个UITableView使用原型单元格.
细胞具有UIButton显示UIViewController(模态)使用的细胞Segue.
我的问题是:我如何将IndexPath单元格传递给第二个视图控制器
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([segue.identifier isEqualToString:@"showGamerDetail"]) {
//its not worked:
NSIndexPath *indexPath = [self._tableView indexPathForSelectedRow];
nDetailViewController *destinationViewController = segue.destinationViewController;
destinationViewController.selectedRowTitle = [gamers objectAtIndex:indexPath.row];
destinationViewController.indexPath = indexPath;
destinationViewController.delegate = self;
}
Run Code Online (Sandbox Code Playgroud)