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;
但沒有澳鵬:/