-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplifying TopHeaderNavigationController #126
Conversation
Used Pop to animate the BackgroundView's layer - helped clean up the logic a lot.
I'm not sure if the merging of hide and show into toggle will cause problems. I remember that i had it that way at first but changed it to separate methods because the app could get stuck in a state where the header display status is inverted (so all views that should have had it didn't have it and all that shouldn't have had it had it.) explicitly calling hide and show prevented that. I couldn't reproduce it in the simulator though, but will test again tomorrow on a device. But switching to POP is good! |
Ya you were sometimes doing your own checks whether the top bar was hidden and then making explicit calls to hide or show. It looks like that all would be redundant, since then check whether it's showing or not is happening inside of toggle. I didn't run into any problems while testing after making the switch, but I can easily change it back to explicit hide and show calls, if you'd prefer that. And I have my own account - I just wasn't thinking and immediately assumed I needed to be on this profile. Whoops |
Hmm. I'll go through it again. Maybe my solution really was redundant. Aah. :D no. Changing the team in the app settings should be enough to let you build for a device |
Tested it on device. when you use the swipe gesture to go back, but only pull it a little bit and then let go, it toggles, but stays in the same viewcontroller. Causing the display status of the header to be inverted. So explicitly showing and hiding should be the better solution. But you are right. checking if the view actually is hidden is kind of redundant at that point. |
The display status correctly changes even when doing the half swipe as you mentioned. Add |
Good catch, and thanks for the gif! I currently toggle the |
After making this change, I can no longer recreate the issue in the gif above. Let me know what you think! |
Simplifying TopHeaderNavigationController
Issue seems resolved. Nice job! 👍 @crookedneighbor 16fa5d4d-6729-4a7d-af3e-26a25850b5b8 |
Good work. Tier awarded! |
Used Pop to animate the BackgroundView's layer - helped clean up the logic a lot. Let me know how well this works on a device - I don't have the provisioning to run it on mine. Hopefully Pop works as smoothly as your native animations were working before and if not, feel free to close this!