8000 UIView Animations For Value Changed · Issue #30 · domesticcatsoftware/DCRoundSwitch · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
UIView Animations For Value Changed #30
Open
@ablackwoodim3

Description

@ablackwoodim3

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0