我是一個新手編程,我有一個基於視圖的應用程序,從SQLite數據庫收集數據,並在表中顯示它。我已經工作了很多,但是我無法讓應用程序在選擇表格上的項目後顯示詳細的視圖。這是我的代碼,如果有人可以幫忙。詳細視圖不顯示從表視圖
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if (dvController == nil)
dvController = [[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle: nil];
Clubs *clubObj = [appDelegate.clubArray objectAtIndex:indexPath.row];
[clubObj hydrateDetailViewData];
dvController.clubObj = clubObj;
[self.navigationController pushViewController:dvController animated:YES];
}
-(void)viewDidLoad {
[super viewDidLoad];
appDelegate = (ClubFindAppDelegate *) [[UIApplication sharedApplication] delegate];
self.title = @"Back";
}
任何幫助將appreiciated。 謝謝
你是否密切關注你的clubObj的保留數量? –
對不起這是什麼意思?@calvinBhai – Wayne
@Wayne thelaws是正確的在viewBased模板導航控制器不存在。您應該使用包含導航控制器和tableView的navigationBased模板來啓動您的應用程序。 –