Page 1 of 1
Trap 4-finger swipe
Posted: Mon Dec 05, 2011 4:32 am
by cwkalish
Is there a way to trap the 4 finger swipe? I'd like to prevent the user from swiping to switch applications. I looked in the iOS doc, but didn't really see a way to figure out how many fingers are being used.
Thanks.
Re: Trap 4-finger swipe
Posted: Mon Dec 05, 2011 7:21 am
by Jellicle
You can certainly track multiple touches (I've tracked 2, but I can't see why you can't track more...) by building a list or array containing touch IDs and timing information. If the IDs were generated within some small number of milliseconds of each other they are likely to be (essentially) simultaneous.However iOS is almost certainly trapping multi touches before they reach your app.
Why do you want to stop the user switching to another app?
Gerry
Re: Trap 4-finger swipe
Posted: Mon Dec 05, 2011 8:05 pm
by cwkalish
My guess was that iOS would get to the swipes before I could, but I wasn't (am not) sure.
I use the iPad for psychology experiments with young kids. They often make all sorts of random gestures, some of which get interpreted as swiping. I want to limit the ways of interacting pretty carefully.
-Chuck