In my iOS application I have UITableView and in some of the cells are a Switch.
I have set a Listener on the Switch in the following way:
[cell.toggle addTarget:self action:@selector(onSwitchToggle:) forControlEvents:UIControlEventValueChanged];
The switch state can also be updated from the program itself and not only by the user pressing it. I'm experiencing some issues with UIControlEventValueChanged and sometimes it seems to fire way more events than it should. So I'm wondering if this is the only way to listen to the Switch state changes (by the user)...?