【发布时间】:2015-01-26 20:05:59
【问题描述】:
然后我的MasterViewController 和它的DetailViewController 两个都连接了。
我正在使用 Parse 作为后端平台,对此我有一个小问题:如何将 MasterViewController 的显示数据传递给 DetailViewController
我正在使用一个名为 "RetrievingObjects" 的 NSArray 来检索它,对于我的 Parse 类查询它可以成功运行(我已经使用我的查询和我的 Array 在 MasterViewController 中显示单元格),我使用它方法:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
DetailViewController *detailVc = [self.storyboard instantiateViewControllerWithIdentifier:@"detailVC"];
detailVC.lblDescription = [self.RetrievingObjects objectAtIndex:indexPath.row];
detailVC.lblTitleForDescr.text = [self.RetrievingObjects objectAtIndex:indexPath.row];
detailVC.dateForDescr.text = [self.RetrievingObjects objectAtIndex:indexPath.row];
[self performSegueWithIdentifier:@"goToDetailSg" sender:self];
}
【问题讨论】:
标签: ios objective-c parse-platform master-detail