-2

我看过一个关于如何创建向下钻取表视图的教程,并且想知道如何做同样的事情,但是UITableViewController我有一个UIViewController.
目前我的 ViewController 中有 2 个 TableView。第一个显示数据,第二个用于过滤。

4

1 回答 1

0

我在编写一个使用多个表视图的应用程序时遇到了同样的问题。你在让 segues 工作时遇到问题吗?我遇到了同样的问题,并在我的 uitableviewcontroller 中使用了以下 segue 代码:

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
TypeTableViewController *nextController = segue.destinationViewController;
NSIndexPath *idx = [self.tableView indexPathForSelectedRow];
nextController.detailLocation = [[self.tableData objectAtIndex: idx.row] objectForKey: @"location"];
nextController.detailType = [[self.tableData objectAtIndex: idx.row] objectForKey: @"type"];

NSLog(@"This is the first attached location: %@",[[self.tableData objectAtIndex: idx.row] objectForKey: @"location"]);
}

这是您的问题所在,还是试图让数据过滤的其他位置?

于 2012-09-03T12:43:25.303 回答