Skip to content

Instantly share code, notes, and snippets.

@hansemannn
Created May 14, 2016 22:04
Show Gist options
  • Save hansemannn/19557b8852be1b36a646b7c45cebf2b1 to your computer and use it in GitHub Desktop.
Save hansemannn/19557b8852be1b36a646b7c45cebf2b1 to your computer and use it in GitHub Desktop.
var btn = Ti.UI.createButton({
title: "Test",
});
var win = Ti.UI.createWindow();
win.add(btn);
btn.addEventListener("click", function(e) {
Ti.API.warn("2) touchEnabled = " + e.source.touchEnabled);
});
win.open();
setTimeout(function() {
btn.setTouchEnabled(false);
Ti.API.warn("3) touchEnabled = " + btn.touchEnabled);
},2000);
Ti.API.warn("1) touchEnabled = " + btn.touchEnabled);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment