简体   繁体   中英

iOS - NavigationBar Title overlapped by previous viewController

we have the issue, that if we pop back from a VC, the current ViewController's navigationBar title is overlapped by the just popped VC navBar title.

But it occurs only sometimes, so i assume it's maybe just a UI refresh bug. Did someone have this problem before, if yes.., how to fix it?

regards ..

I've run into this a few times in the app I maintain. In every case the problem was caused by people doing silly things with navigation controllers.

For example, when wishing to navigate to a new view, a view controller that was already part of a navigation controller's view stack would instantiate a new navigation controller and push its root view controller onto the first navigation controller's view stack.

Then, in the new view controller (the one contained in the second nav controller's view stack), they would try to pop to a previous view. This would cause funny animation bugs and random titles to show on the navigation bar.

The solution was to remove the second navigation controller from the flow (it didn't serve any particular purpose).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM