event.numTaps

Type Number
Event tap
Revision Release 2024.3703
Keywords tap, numTaps
See also system.setTapDelay()

Overview

The number of taps on the screen.

Examples

Global Tap Listener
local function tapListener( event )
    print( event.numTaps )
end
Runtime:addEventListener( "tap", tapListener )
Table Listener 1
local object = display.newImage( "image.png" )

function object:tap( event )
    print( event.numTaps )
end

object:addEventListener( "tap", object )
Table Listener 2
local object = display.newImage( "image.png" )

local function onObjectTap( self, event )
    print( event.numTaps )
end

object.tap = onObjectTap
object:addEventListener( "tap", object )