标签:
//此方法在表视图控制器.m文件中最下面
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { // Get the new view controller using [segue destinationViewController]. // Pass the selected object to the new view controller.
//将当前位置的jid赋值给要跳转的视图控制器的的jid属性 if ([segue.identifier isEqualToString:@"push"]) { UITableViewCell *cell = sender; ChatTableViewController *chatVC = segue.destinationViewController;//跳转的下一界面 NSIndexPath *indexPath = [self.tableView indexPathForCell:cell];//获取位置信息 XMPPJID *jid = self.dataArray[indexPath.row];//根据位置信息找到数据 chatVC.jid = jid; } }
标签:
原文地址:http://www.cnblogs.com/dabaomo/p/5267263.html