UINavigationBar后退按钮消失 [英] UINavigationBar back button disappears
问题描述
我已经浪费了很多时间来处理这个奇怪的错误/错误.
I have lost a lot of time with this weird error/bug.
我有2个带有NavigationController的ViewController,我从第一个移到了pushViewController的第二个.但是,当我按下第二个viewController时,它会显示出来,并且导航栏上的backButton也将显示出来.但是此按钮会在很短的时间内消失(大约半秒钟).第一个viewC的标题还可以,并且在后退按钮上也可以显示(我可以在显示它的时候抓到它).
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...
谢谢
推荐答案
确定.我是个白痴.忘记了我清除了viewDidDisappear中包含标题的内容.因此,对于后代的结论是……当backBarButton遇到问题时-前一个viewController的标题存在99%的错误,或者将该按钮隐藏在某个地方" ...
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"...
这篇关于UINavigationBar后退按钮消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!