问题
I just embedded my UINavigationController into a UITabBarController. I can no longer see my view title or edit button. Please see storyboard below. How do I make the edit button visible again?
My Storyboard:
回答1:
Rather than the following organization (which you're currently using):
NavController -> TabBarController -> ViewControllerA
\
-> ViewControllerB
You must do the following:
TabBarController -> NavControllerA -> ViewControllerA
\
-> NavControllerB -> ViewControllerB
UITabBarController
s should always be the root view. Each child view controller needs its own navigation controller to achieve the navigation bar + tab bar effect you desire. Here is an example of what the structure should look like:
As for adding navigation items / titles to each view controller once you've done the above, make sure to drag Navigation Items onto each view controller. You can find the Navigation Item in the Object Library at the bottom of the Utilities view:
来源:https://stackoverflow.com/questions/40509479/edit-button-inside-uitabbarcontroller-and-uinavigationcontroller