Trap 4-finger swipe

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
cwkalish
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 78
Joined: Thu Sep 30, 2010 2:24 am

Trap 4-finger swipe

Post by cwkalish » Mon Dec 05, 2011 4:32 am

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.

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: Trap 4-finger swipe

Post by Jellicle » Mon Dec 05, 2011 7:21 am

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
14" MacBook Pro
Former LiveCode developer.
Now recovering.

cwkalish
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 78
Joined: Thu Sep 30, 2010 2:24 am

Re: Trap 4-finger swipe

Post by cwkalish » Mon Dec 05, 2011 8:05 pm

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

Post Reply