當我嘗試呈現一個模態視圖控制器時,它覆蓋了我的導航控制器的導航欄。有小費嗎?謝謝。模態視圖導航控制器欄
UPDATE(含代碼):
ComposeText *compText = [[ComposeText alloc] initWithNibName:@"ComposeText" bundle:[NSBundle mainBundle]];
compNavController = [[UINavigationController alloc] initWithRootViewController:compText];
UIBarButtonItem *doneButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:compNavController action:@selector(compDoneTapped:)];
compNavController.navigationItem.rightBarButtonItem = doneButton;
[self presentModalViewController:compNavController animated:YES];
compText.title = @"Compose";
[doneButton release];
一切似乎是爲了,但按鈕依然沒有出現在導航欄上。
我需要顯示對應用程序導航至關重要的按鈕 - 只需發佈內容的按鈕和取消按鈕即可。 presentModalViewController動畫似乎最有意義。除了將新視圖推到導航控制器的堆棧外,還有更好的選擇嗎? –