Skip to content

Conversation

@irtemed88
Copy link

Adds support for different animation types when the popUp is being presented.

Also adds a flag for enabling/disabling the popUp view.

Rather than pass an `animated` flag, the slider now has an enum for setting the type of animation. This property is passed to the popUp view when a request is made to show/hide.

The bounce animation was also updated to use the newer spring damping API. Since this works on the UIView level rather than the underlying CALayer, `actionForLayer:forKey:` was removed (since that will nullify the animation). Removing that method didn't seem to have any affect on the animations in the example app.
@alskipp
Copy link
Owner

alskipp commented Jan 9, 2016

Hi @irtemed88, thanks for making the PR. I've checked your changes and the code is great, however the feel of the animation isn't quite right, it's a bit too rapid and not as smooth. I don't think it's an issue with your code, but if you tap and release a few times in quick succession, the animation sometimes has strange glitches (this might be an issue with Spring animations?).

I don't wish to be excessively critical, it's just that it took a lot of experimentation to get the animation feel just right. If you compare your version with the original, you'll see that the animation styles are quite different.

The code using Spring animation is actually much nicer than the original CAAnimations, I'm just not sure if it's possible to produce the same effect?

All the best,
Al

@irtemed88
Copy link
Author

Hey Al -- Sorry for the late reply... The email notification for this response got buried and I just now realized it existed.

No worries at all. If I have some time I'll try smoothing out my animation, adding another flag for the animation style you did using CAAnimation, and fixing the issue where the thumb control is tapped rapidly.

I think ideally it'd be nice if we could provide a way for the consumer to override the animation style, but that may be overkill.

Thanks!
Demetri

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