我刚刚学习了本教程:
从 NSDictionary 对象的 NSArray 中实现 UITableView 部分
这是一个很好的例子。但我想添加更多功能。我想加载一个detailView
. 我遵循了 5 个以上的教程来做到这一点,但每次都失败了。4小时后,我问你。
我怎样才能加载detailView
这个样本?
问候,范妮
已经试过了,现在有这个代码:
- (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;
但什么也没发生:/