我正在使用下面的代碼來嘗試爲我的應用程序製作一個「後退」按鈕,該代碼所在的視圖位於模式視圖中任何軸承?):「返回」按鈕不顯示在UINavigationController中
navBar = [[UINavigationController alloc] initWithRootViewController:tvController];
[navBar.view setFrame:CGRectMake(0, 0, 320, 460)];
self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle: @"Back"
style: self.navigationController.navigationItem.leftBarButtonItem.style
target: self
action: @selector(backAction)];
navBar.navigationItem.backBarButtonItem.enabled = YES;
[self.view addSubview:navBar.view];
該視圖根本不顯示,謝謝任何提示!
編輯:即使我使用leftBarButtonItem,它仍然不出現,我認爲有一些問題與我的代碼self.navigationItem位?
http://stackoverflow.com/a/11160287/169277 – ant
即使我使用leftBarButtonItem,它仍然不顯示,我認爲有我的代碼self.navigationItem位有一些問題? – prince
可能重複的[UIBarButton不會顯示在我的UINavigationController](http://stackoverflow.com/questions/11159707/uibarbutton-wont-show-in-my-uinavigationcontroller) – FoamyGuy