Skip to content

Conversation

@damirkotoric
Copy link

The colorise function now takes the element height into consideration
when animating, which makes the animation look as intended when the
switch is customised.

The colorise function now takes the element height into consideration
when animating, which makes the animation look as intended when the
switch is customised.
@damirkotoric
Copy link
Author

Before:
before

After:
after

@abpetkov
Copy link
Owner

I can't merge this as it is right now. What I agree on, is that the shadow behaviour is not 100% equivalent to the native iOS7 switch - the shadow animation should end before the handle animation. But you're just changing the size, which as we can see in your preview, leaves a slight transparent layer over the switch color during animation. And this doesn't make it any better. Honestly, I like it better as it is now.

So if you're willing to do try to mimic iOS7 behaviour and make it exactly the same, I'll be glad to review that.

P.S. This is the default iOS7 behaviour:

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

Successfully merging this pull request may close these issues.

2 participants