Enricoza / EZCustomNavigation

Easy Custom Navigation Controller that allows popping view controllers with pan gesture from center too and UnPop them back in.
MIT License
23 stars 5 forks source link

Workaround legal swipe actions from the left side #8

Open ReDetection opened 3 years ago

ReDetection commented 3 years ago

How I was able to fix #6

ReDetection commented 3 years ago

I just noticed that proposed solution might be not optimal. What I did was to require all other gesture recognizers to fail (basically force-included all gestures to fall into the trap and opt out scroll-view one). Maybe we should instead only require UITableView recognizers to fail in order for EZ pan recognizer to recognize (so the other way around – none are required to fail except what we want to work). I have two reasons in mind:

  1. In my app I suddenly start to conflict with UXCam pod (basically a visor) – they seem to install global pinch gesture recognizer which also doesn't fail quickly.
  2. Future iOS updates might add more gesture recognizers and I find "opt-in" way safer

I will include my updated solution here and push a new commit, but sure it's up to you which way to choose.

Enricoza commented 3 years ago

I'm not sure this is the proper way forward. Need to further investigate, but probably we're gonna need to defer some of this responsibility to the app which actually knows what kind of gesture it uses rather than we having to guess for it.

ReDetection commented 3 years ago

Sounds reasonable. Maybe a closure in the EZNavigationConfiguration? Please let me know if you have a suggestion or feel free to close the PR if your own way :)