UINavigationBar back button disappears

…衆ロ難τιáo~ 提交于 2019-12-24 21:51:06

问题


I have lost a lot of time with this weird error/bug.

I have 2 ViewControllers with navigationController and I move from the first to the second with pushViewController. But when I push second viewController, it shows up and also backButton on the navigation bar shows up. But this button disappear in a very short time (about half a second). Title of the first viewC is ok and it`s also on the back button (I can catch it in the time it is shown up).

Does anyone have a tip where could be the problem? I am lost in this time...

Thanks


回答1:


OK. I'm an idiot. A forgot that I clear content including title in my viewDidDisappear. So the conclusion for the future generations... "when you have problems with backBarButton - it's 99% error with the previous viewController's title or you are hiding that button somewhere"...



来源:https://stackoverflow.com/questions/4692269/uinavigationbar-back-button-disappears

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