Open ablackwoodim3 opened 12 years ago
I can confirm that this fixes this bug for me.
If a ModalViewController's view has DCRoundSwitch, then there will be no animation if dismissing it. @ablackwoodim3 work fixed it too. I went insane for 3 hours and thanks for the fix
Thank you so much, I nearly went bananas looking for this error!
[UIView animateWithDuration...] methods don't work when called in response to the switch's value being changed. This can be fixed very easily by replacing these lines in setOn:animated:ignoreControlEvents:
if (previousOn != on && !ignoreControlEvents) [self sendActionsForControlEvents:UIControlEventValueChanged];
with:
if (previousOn != on && !ignoreControlEvents) { [CATransaction begin]; [CATransaction setDisableActions:NO]; [self sendActionsForControlEvents:UIControlEventValueChanged]; [CATransaction commit]; }