我隱藏了導航欄,所以我可以在那裏有一個自定義的UIToolBar,但是當我將工具欄項目的action屬性設置爲彈出它的方法時,它不起作用,我認爲這可能是因爲我隱藏了導航欄。彈出視圖控制器關閉堆棧沒有導航欄顯示?
這裏是我的代碼:
[toolBarItems addObject:[[UIBarButtonItem alloc] initWithTitle:@"Articles" style:UIBarButtonItemStyleBordered target:nil action:@selector(backButtonTapped)]];
...
- (void)backButtonTapped {
[self.navigationController popViewControllerAnimated:YES];
}
但沒有任何反應。
你是什麼意思隱藏導航欄?檢查並查看您的導航控制器是否爲 – JeffN 2013-04-26 18:50:08
[self.navigationController setNavigationBarHidden:YES animated:NO]; – 2013-04-26 18:52:07
不,不是零。 – 2013-04-26 18:52:44