【发布时间】:2009-04-11 10:50:07
【问题描述】:
我在将 UITableViewController 推送到 NavigationController 时遇到问题。使用以下代码:
ProblemEditController *problemEditController = [[[ProblemEditController alloc] initWithNibName:@"ProblemEditController" bundle:nil] retain];
problemEditController.problem = [[Problem alloc] init];
[self.navigationController pushViewController:problemEditController animated:YES];
[problemEditController release];
导航控制器按预期工作,但是表格视图未显示。在我的 UITableViewController 上调用 numberOfSectionsInTableView,但未调用 numberOfRowsInSection 和 cellForRowAtIndexPath,并且视图显示为空白。
我有什么明显的遗漏吗?
编辑
我已经更改了 nib 文件中的某些内容(愚蠢地,不记得是什么),现在我看到 numberOfRowsInSection 正在被调用。
【问题讨论】:
标签: iphone cocoa-touch