Class Delegate.GestureRecognizer

Gesture Recognizer Delegate Interface.

the interface for controlling a Gesture Recognizer via a delegate. currently all methods are optional, only implement if needed.

Usage:

  •  local Gesture = require 'dmc_corona.dmc_gestures'
    
     -- setup delegate object
     local delegate = {
       shouldRecognizeWith=function(self, did_recognize, to_fail )
         return true
       end,
     }
  •  local widget = dUI.newPanGesture()
     widget.delegate = <delgate object>
  •  local Gesture = require 'dmc_corona.dmc_gestures'
     local widget = dUI.newPanGesture{
       delegate=<delegate object>
     }

Methods

:shouldRecognizeWith (did_recognize, to_fail) (optional) asks delegate if Gesture Recognizer should remain active.


Methods

:shouldRecognizeWith (did_recognize, to_fail)
(optional) asks delegate if Gesture Recognizer should remain active. return true if Gesture Recognizer should remain, the default return value is false.

Parameters:

  • did_recognize object Gesture Recognizer which has Recognized its gesture
  • to_fail object Gesture Recognizer which is about to be Failed

Returns:

    bool true if Gesture Recognizer to_fail should remain.
generated by LDoc 1.4.3 Last updated 2015-05-14 11:55:03