我目前正在尝试将我的应用程序转换为 Storyboard。我的数据当前存储在一个 plist 文件中,我在当前didSelectRowAtIndexPath:
方法中使用以下代码非常轻松地向下钻取了我的表视图:
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSDictionary *dictionary = [self.tableDataSource objectAtIndex:indexPath.row];
NSArray *children = [dictionary objectForKey:@"Children"];
[tableView deselectRowAtIndexPath:indexPath animated:YES];
if ([children count] == 0)
{
NSString *tempString1 = [dictionary valueForKeyPath:@"Movie"];
NSString *tempString2 = [dictionary valueForKeyPath:@"Text"];
NSString *tempString3 = [dictionary valueForKeyPath:@"Diagram"];
DetailsVC *dvc = [[DetailsVC alloc] initWithNibName:@"DetailsVC" bundle:nil];
dvc.movie = tempString1;
dvc.pdfdesc = tempString2;
dvc.pdfDiagram = tempString3;
dvc.navigationItem.title = [dictionary valueForKeyPath:@"Title"];
[self.navigationController pushViewController:dvc animated:YES];
}
else
{
LevelsVC *lvc = [[LevelsVC alloc] initWithNibName:@"LevelsVC" bundle:[NSBundle mainBundle]];
lvc.currentLevel += 1;
lvc.navigationItem.title = [dictionary valueForKeyPath:@"Title"];
[self.navigationController pushViewController:lvc animated:YES];
lvc.tableDataSource = children;
}
我的问题是:我究竟如何将此方法转换为与 Segues 和 Storyboards 一起使用?我可以轻松地为detailViews 创建一个segue,网上有一百万个教程,但我根本不知道如何深入查看我的tableview 中的数据。
任何帮助或示例代码将不胜感激!