2011-11-17 52 views
0

我只是跟着这个教程:
Implementing UITableView Sections from an NSArray of NSDictionary Objects加载一个DetailViewController在TableViewcontroller

这是一个很好的例子。但我想添加更多功能。我想加载一个detailView。我遵循了5个以上的教程来做,但我每次都失败。 4个小时后,我问你。

如何加载detailView这个样本?

问候,范妮


已经尝试过,nowi有这样的代码:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 
    NSString *selectedRow = nil; 
NSDictionary *dictionary = [self.books objectAtIndex:indexPath.row]; 
    selectedRow = [dictionary objectForKey:@"Title"]; 

    //Initialize the detail view controller and display it. 
    DetailViewController *dvController = [[DetailViewController alloc] initWithNibName:@"DetailView" bundle:[NSBundle mainBundle]]; 
    dvController.selectedRow = selectedRow; 
    [self.navigationController pushViewController:dvController animated:YES]; 

    [dvController release]; 
    dvController = nil; 

但没有澳鹏:/

回答

相关问题