UIScrollView how to implement a 3 finger scroll

Hello all,


I'm attempting to use UIScrollView for an interactive custom map. For this, I would need to implement a 3 finger scroll for moving the map around because I use 1 finger to tell you what map item you are currently touching. The problem I'm running into is that the UIScrollView PinchGestureRecognizer is intercepting touches before the PanGestureRecognizer can get to them. I've tried the suggested methods in the documentation for preferring one gesture over another, but that doesn't seem to work with a UIScrollView. Is there any way to accomplish this without having to make my own custom view?

Replies

Did you allow for multiple gestures ?

Show some code, pls: - such as where you spec min/max touches so PanGR is recognized/triggered:



var maximumNumberOfTouches: Int

The maximum number of fingers that can be touching the view for this gesture to be recognized.



var minimumNumberOfTouches: Int

The minimum number of fingers that can be touching the view for this gesture to be recognized.


This seems like a bad idea. Almost every other scrollable UI in any app uses one finger to move around. Users would never discover a 3 finger gesture to scroll around. On other platforms where you need multiple fingers (Google Maps on various websites, I’m looking at you) they pop up a message telling you to use two fingers. This is jarring and unintuitive - a terrible user experience.


Anyway, getting gesture recognizers to play nicely with each other can be a challenge. You sometimes have to override shouldRecognizeSimultaneouslyWith... and other delegate methods - I forget which delegate protocol those are in. But it does get a little messy if you’re building a non standard UI.

Yes, I did allow multiple gestures.

I agree that a 3 finger scroll is a bad idea, but for the interactive map, I'm making it is really the only option I have. The users the app targets are blind/low vision so a 3 finger gesture is not a foreign concept to users who are used to VoiceOver gestures. I have attempted to use shouldRecognizeSimultaneously and shouldRequireGestureToFail and both have not given any decent results.