Closed StephenRadachy closed 2 years ago
Tried this out and it does not dismiss by moving the view with the user's touch and pop after a certain threshold like Twitter and Instagram, but suddenly pops after a small swipe gesture. I'm open to this feature because I do use it in those apps, but there appears to still be some issues with this implementation.
Tried this out and it does not dismiss by moving the view with the user's touch and pop after a certain threshold like Twitter and Instagram, but suddenly pops after a small swipe gesture. I'm open to this feature because I do use it in those apps, but there appears to still be some issues with this implementation.
Cool I'll keep iterating on it - only tested it in the simulator. Stay tuned!
I didn't look into your PR in detail, but I remember that I suggested the same feature in the official Mastodon app a while ago. It was eventually added with this commit: https://github.com/mastodon/mastodon-ios/commit/f0658f77f8289fe68bdba49fa71586d21ece09f7. Perhaps you can get some inspiration from it.
@vollkorntomate thanks for pointing this out! The StackOverflow page they reference eluded me in my research.
@jzzocc ready to review again
Thanks so much!
Summary
This PR adds the ability to swipe to pop view controllers within navigation controllers like many other popular Apps.
We do this by creating a subclass of
UINavigationController
calledSwipeableNavigationController
, which has all of the gesture code. Then inMainNavigationViewController
we swap out the navigation controller init.Other Information
Shout out to @eoghain for building the reference implementation that I used!
Demo