M13Checkbox icon indicating copy to clipboard operation
M13Checkbox copied to clipboard

Listening for Value Changes

Open theonlynick0430 opened this issue 6 years ago • 2 comments

In the example code, you guys use an IBOutlet to listen for any value changes in the checkbox. However, there doesn't seem to be an alternative to listen for value changes through code (creating checkbox through code).

theonlynick0430 avatar Aug 07 '18 11:08 theonlynick0430

Try to create a target for an eventUIControlEvents.valueChanged programmatically. Here is an example:

checkbox.addTarget(self, action: #selector(checkboxValueChanged(_:)), for: .valueChanged)

andreaantonioni avatar Aug 08 '18 18:08 andreaantonioni

This would be great to add to the Project summary.

sphericalwave avatar Jul 06 '19 22:07 sphericalwave