我試圖用推我的導航控制器上一個新的觀點:pushViewController crahses
-(IBAction)switchPage:(id)sender
{
MyTableViewController *myTableView = [[CMyTableViewController alloc] initWithNibName:@"MyTableView" bundle:[NSBundle mainBundle]];
[myTableView release];
[self.navigationController pushViewController:myTableView animated:YES];
}
我遇到了以下錯誤:
2010-02-25 21:19:57.717 CoC[3399:20b] *** -[UIViewController switchPage:]: unrecognized selector sent to instance 0xf1a660
2010-02-25 21:19:57.718 CoC[3399:20b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[UIViewController switchPage:]: unrecognized selector sent to instance 0xf1a660'
迄今爲止的答案正確地指出,推送視圖後應該完成發佈,但與錯誤消息無關。你如何設置呼叫switchPage?問題在那裏。 – willcodejavaforfood 2010-02-26 08:44:25