UINavigationBar feedback button disappears

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

I have 2 ViewControllers with a navigationController, and I navigate from the first to the second using pushViewController. But when I click on the second viewController, it appears, and the backButton also appears in the navigation bar. But this button disappears in a very short time (about half a second). The title of the first viewC is fine, and it is also on the back button (I can catch it while it is being displayed).

Does anyone have a clue where the problem might arise? I am lost at this time ...

thanks

0
source share
1 answer

OK I am an idiot. I forgot that I clear the contents, including the title, in my view of DidDisappear. So, the conclusion for future generations ... "when you have problems with the backBarButton - is it a 99% error with the previous viewController header or you hide this button somewhere" ...

0
source

Source: https://habr.com/ru/post/1235011/


All Articles