Touch:dispatch()
Dispatches all pending touch events to the system. This method is useful when you want to ensure all touch events are processed immediately.
Signature
dispatch(): void
Returns
- Type:
void
Examples
Touch:init()
-- Perform a series of touch actions
Touch:down(100, 200)
Touch:move(300, 400)
Touch:up()
-- Dispatch all pending events
Touch:dispatch()
-- You can also dispatch after each action if needed
Touch:down(500, 600)
Touch:dispatch()
Touch:move(700, 800)
Touch:dispatch()
Touch:up()
Touch:dispatch()