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

Take element height into consideration in colorize function #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Take element height into consideration in colorize function #35

wants to merge 1 commit into from

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