2

In iOS 6 and previous, if you register for UIControlEventValueChanged on a UISwitch and the user taps the switch, your method is called when the change animation finishes. In iOS 7, it appears to happen when the switch animation starts (or at least when the touch ends). Is there a way to regain the old behavior?

EDIT: I should clarify why I'm asking this. I have a switch in a UITableViewCell. When the switch value changes, the content of the table changes, so I need to call [tableView reloadData]. The changes are too complex to handle with the add/remove section/cells animation API. So my switch gets regenerated in a new cell with its new value, and I lose the cool switch animation. In iOS 6 and previous, this wasn't a problem because the handler executed at the end of said animation.

Tom Hamming
  • 10,577
  • 11
  • 71
  • 145

0 Answers0