Class Gesture.Tap

Tap Gesture Recognizer Class.

gestures to recognize tap motions

Inherits from:

Usage:

     local Gesture = require 'dmc_gestures'
     local view = display.newRect( 100, 100, 200, 200 )
     local g = Gesture.newTapGesture( view )
     g:addEventListener( g.EVENT, gHandler )

Getters and Setters

.accuracy () the maximum movement allowed between taps, radius (number).
.taps () the minimum number of taps required to recognize (number).
.touches () the minimum number of touches required to recognize (number).

Class Constants

Gesture.Tap.EVENT Event name constant.
Gesture.Tap.GESTURE Event type constant, gesture recognized.


Getters and Setters

.accuracy ()
the maximum movement allowed between taps, radius (number).

Usage:

  • print( gesture.accuracy )
  • gesture.accuracy = 10
.taps ()
the minimum number of taps required to recognize (number). this specifies the minimum number of taps required to succeed.

Usage:

  • print( gesture.taps )
  • gesture.taps = 2
.touches ()
the minimum number of touches required to recognize (number). this is used to specify the number of fingers required for each tap, eg a two-fingered single-tap, three-fingered double-tap.

Usage:

  • print( gesture.touches )
  • gesture.touches = 2

Class Constants

Gesture.Tap.EVENT
Event name constant.
  • EVENT

Usage:

  • gesture:addEventListener( gesture.EVENT, handler )
  • gesture:removeEventListener( gesture.EVENT, handler )
Gesture.Tap.GESTURE
Event type constant, gesture recognized. this type of event is sent out when a Gesture Recognizer has recognized the gesture
  • GESTURE

Usage:

     local function handler( event )
     	local gesture = event.target
     	if event.type == gesture.GESTURE then
     		-- we have our event !
     	end
     end
generated by LDoc 1.4.3 Last updated 2015-05-14 11:55:03