alskipp / ASValueTrackingSlider

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

Keep the PopUpView always visible #30

Closed matheusmaaz closed 9 years ago

matheusmaaz commented 9 years ago

Hi,

First of all, thanks for such useful lib :)

I wonder if there's a way to always keep the slider's popUpView visible (by default, it gets hidden once you stop interacting with the slider).

Thanks, Matheus

alskipp commented 9 years ago

Hi @matheusmaaz, thanks for using the control. Yes, it's possible to always show the popUpView. If you manually call showPopUpView, it will stay visible until you call hidePopUpView.

There is a separate branch (which really should be merged into master when I get around to it) https://github.com/alskipp/ASValueTrackingSlider/tree/popup_refactor - there are a few improvements in the animation code and also the ability to control if the popUpView animates when showing and hiding.

// present the popUpView manually, without touch event.
- (void)showPopUpViewAnimated:(BOOL)animated;
// the popUpView will not hide again until you call 'hidePopUpViewAnimated:'
- (void)hidePopUpViewAnimated:(BOOL)animated;
matheusmaaz commented 9 years ago

Hi @alskipp, thanks for your answer. It works like a charm.

Thank you again, Matheus

alskipp commented 9 years ago

Glad it helped,

All the best, Al