问题
I have a tabbed table view controller and in one of the tabs, I'm clicking on a cell which takes me to a View Controller instead of another Table view.
It's all embedded in a UINavigationController but when I push, I do not get the back button with the name of the previous view controller on it.
In the other tabs, I click on a cell and push to another table view and that works fine, but it does not in this case.
I've been reading up on this and have certainly set the title of my new view controller in the viewDidLoad of that detail class.
The back button functionality works, it takes me back to the previous controller, but it just doesn't show me the label.
Any assistance on this would be very much appreciated.
Thanks,
回答1:
If the title of the pushed view controller is too big, then only the back arrow icon will be displayed, without any text. That is the default behavior.
回答2:
do you checked the Shows Navigation Bar item in the attribute inspector of that particular navigation controller
or you can programmatically add the statement
self.navigationController.navigationBarHidden = NO;
来源:https://stackoverflow.com/questions/20469089/missing-back-button-from-uiviewcontroller-in-a-navigation-controller