我在将UITableViewController推送到NavigationController时出现问题。使用以下代码:UITableViewController和NavigationController
ProblemEditController *problemEditController = [[[ProblemEditController alloc] initWithNibName:@"ProblemEditController" bundle:nil] retain];
problemEditController.problem = [[Problem alloc] init];
[self.navigationController pushViewController:problemEditController animated:YES];
[problemEditController release];
导航控制器按预期工作,但未显示表格视图。 numberOfSectionsInTableView在我的UITableViewController上被调用,但是numberOfRowsInSection和cellForRowAtIndexPath没有被调用,并且视图显示为空白。
有什么明显的我失踪了吗?
编辑
我在笔尖文件(愣神,不记得是什么)改变了一些东西,我看到现在numberOfRowsInSection被调用。
不幸的是,这没有奏效 - 同样的问题。我不明白为什么在调用numberOfSectionsInTableView函数时没有显示视图。 – Codebeef 2009-04-11 12:07:26
尝试使用prensetModalViewController而不是推送视图来显示视图。看看是否有变化。 – 2009-04-11 12:16:29