0
在我appdelagate我有這個UINavigationBar的內容,以顯示:我怎樣才能當視圖推
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions: (NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
MasterViewController *masterViewController = [[MasterViewController alloc] initWithNibName:@"MasterViewController_iPhone" bundle:nil];
self.navigationController = [[UINavigationController alloc] initWithRootViewController:masterViewController];
self.window.rootViewController = self.navigationController;
[self.window makeKeyAndVisible];
return YES;
}
我有一個馬西德威和的DetailView,馬西德威是一個表,當我點擊一排馬西德威是推到detailview,但我添加到detailview的barbutton項目不會顯示出來。它看起來像這樣:
DetailViewController *detailViewController = [[DetailViewController alloc] initWithNibName:@"DetailViewController_iPhone" bundle:nil];
[self.navigationController pushViewController: detailViewController animated:YES];
你能告訴我們你是如何加入欄按鈕的項目? –
你說「我添加到detailview的barbutton項目不會顯示」。你用什麼代碼來添加它們? – rdelmar
想到明顯的,但:確保他們沒有隱藏在ib;控制器中是否有操縱工具欄或其按鈕的邏輯?如果是這樣,是否在xib/storyboard中正確連接了這些元素?我認爲viewWillAppear中的一些簡單調試將提供一些線索 – wkhatch