我遇到了一個問題,試圖讓一個新的viewcontroller工作。我有一個UITableView
從plist
文件加載。第一行將轉到detailviewcontroller
,但下一行不會並且有錯誤。第二個控制器中的錯誤是DetailViewController2
可能不會響應「從文件中獲取步驟」。有任何想法嗎?tableview導航
DetailViewController *detailViewController = [[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle:nil];
[detailViewController getStepsFromFile:[files objectAtIndex:indexPath.row]];
// Pass the selected object to the new view controller.
[self.navigationController pushViewController:detailViewController animated:YES];
[detailViewController release];
DetailViewController2 *detailViewController2 = [[DetailViewController2 alloc] initWithNibName:@"DetailViewController2" bundle:nil];
[detailViewController2 getStepsFromFile:[files objectAtIndex:indexPath.row]];
// Pass the selected object to the new view controller.
[self.navigationController pushViewController:detailViewController2 animated:YES];
[detailViewController2 release];
是錯誤還是警告信息。 – ArunGJ 2012-03-10 01:09:24
您的getStepsFromFile方法在哪裏聲明?也許你需要一個文件管理器類,爲你提供你的tableView所需的數據。只是一個想法。 – Jamie 2012-03-10 03:16:48