Back button does not show up in navigation controller

青春壹個敷衍的年華 提交于 2021-02-07 11:36:06

问题


I have added a show segue from table cell in one view controller to another table view embedded in a navigation controller. When I click on the cell in the first view the segue works as expected and brings up the new view. However, the "Back" button (with the title of the original view) does not appear in the navigation bar.

I searched SO and found a number of such questions asked in the past (both for Swift and Objective-C). Most of them suggest that the first view needs a title for this to work. I do have a title. I even added one programmatically, just in case. That did not help. One of the answers suggested to add an identifier to the segue; that didn't help me either.

How else can I debug this issue?


回答1:


It seems like the problem is that you are pushing into a totally new navigationController, remove it, and make segue dirrectly into the new view Detail itself, they have to be in the same navigationController to work




回答2:


Verify you are not hiding backbutton in destination controller...



来源:https://stackoverflow.com/questions/38448726/back-button-does-not-show-up-in-navigation-controller

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