is there anyway to have an eventlistener listen to multiple types?
i want a single eventlistener to listen for either a swipe or a click. how do i do that?
thanks
1 Answer
-
I don't think this is supported on Titanium, you can declare a common function from both events and then just call the same function from both, is not that big of a difference.
function execute (parameter){ //Do Something }; view.addEventListener('click', function(e){ execute(e.data) }); view.addEventListener('swipe', function(e){ execute(e.data) });