In Titanium how do I execute a button click event from code?
I t开发者_开发百科ried
btn.click();
And the error message is 'Cannot call property click in object ti.modules.titanium.ui.ButtonProxy@44f61. It is not a function, it is "object"'
btn.fireEvent('click');
this should work
btn.addEventListener('click',function() {
Titanium.API.info('Button Clicked');
});
精彩评论