我在將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