In Titanium how do I execute a button click event from code?
문제
I tried
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');
});
제휴하지 않습니다 StackOverflow