Help setting event on layers within a class
Hi guys, need some help with adding interactivity to a checkbox component I made by expanding the native Layer class.
I want to be able to:
Tap any of the checkListOption layers inside the loop - and that means the whole layer, so anywhere between the divider lines.
On tap the checkMark should be revealed within the checkBox AND the checkListOption backgroundcolor should change to smoke (a shade of grey I saved as. a variable).
Right now I've got a click event working only on the checkBox to reveal the checkMark inside... and I can't work out how in the same event to change the background of the parent class.
But that's not what I want anyway. I'd like the tap event on the parent checkListOption, and for the checkMark to then appear in the checkBox and the entire background colour of the checkListOption to change.
Any help greatley appreciated! Hopefully the code is easy enough to follow :)