Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UIView Animations For Value Changed #30

Open
ablackwoodim3 opened this issue Oct 22, 2012 · 3 comments
Open

UIView Animations For Value Changed #30

ablackwoodim3 opened this issue Oct 22, 2012 · 3 comments

Comments

@ablackwoodim3
Copy link

[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]; }

@gureckis
Copy link

I can confirm that this fixes this bug for me.

@wyefei
Copy link

wyefei commented Apr 8, 2013

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

@npersson
Copy link

Thank you so much, I nearly went bananas looking for this error!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants