alskipp / ASValueTrackingSlider

A UISlider subclass that displays the slider value in a popup view
MIT License
1.84k stars 234 forks source link

Add support for different slider popUp animations #47

Open irtemed88 opened 8 years ago

irtemed88 commented 8 years ago

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

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

alskipp commented 8 years ago

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 commented 8 years ago

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