andreamazz / AMScrollingNavbar

Scrollable UINavigationBar that follows the scrolling of a UIScrollView
MIT License
6.05k stars 633 forks source link

Tabbar follower doesn't return to the original position when the app goes to background #313

Closed lawicko closed 6 years ago

lawicko commented 6 years ago

Steps to reproduce:

  1. In the application with the UITabBarController as the root view controller, have AMScrollingNavbar instance in one of the tabs.
  2. Make the tab bar a follower of the scrolling navbar.
  3. Scroll the scroll view so that the navigation bar and the tab bar disappears.
  4. Make the app go to background by tapping on the home button or whatever.
  5. Come back to the app.

Expected: As in previous versions, I'd expect the tab bar becomes visible.

Actual: The tab bar stays hidden, so now there is no way to actually get the tab bar back.

Note: This bug was introduced in c382e61bf04b111a420b29f6066e006927ee2abd

andreamazz commented 6 years ago

Thank you @lawicko for the detective work.
I don't understand why that commit breaks the tabbar though 🤔 Any ideas?

andreamazz commented 6 years ago

Well, I'll cross it off as UIKit being UIKit. Apparently a rotation is triggered when going back to foreground, and that showNavbar was required. This should be ok now, let me now.