Missing Back Button from UIViewController in a Navigation Controller

一个人想着一个人 提交于 2019-12-13 04:04:18

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!