Simulate/Call onTap for button in code?

Is it possible to simulate or call the onTap for a button in my code? Thanks!

Answers

  • Answer ✓

    Yep. If you have a reference to your button you can use myButton.delegate("onTap");. If you only have a reference to it's parent (or parent's parent, etc.) and no other container in that part of the containment hierarchy has an onTap you can use someAncestor.distribute("onTap");

Sign In or Register to comment.