TomThorpe / TTRangeSlider

A slider, similar in style to UISlider, but which allows you to pick a minimum and maximum range.
MIT License
968 stars 203 forks source link

Would like to add a flag to hide the labels above the slider controls… #21

Closed chefnobody closed 8 years ago

chefnobody commented 8 years ago

…. Why? Two main reasons:

  1. I think this makes for a cleaner API. The work-around mentioned in the header seems overly complicated and doesn't work well with Swift. It might be possible with Swift, but I was unable to downcast an NSNull or AnyObject to NSNumberFormatter and get back an NSNull in Obj-C. I was only ever able to get a nil which the other sort of unclear use-case in the API. If you set this property to nil you get no formatter style. Anyway ... I just wanted to turn off the labels. Seems to me a flag would be a much cleaner way to go about it.
  2. I didn't need labels animated and following the thumb controls for my purposes. I would assume others don't either.

What I've done:

TomThorpe commented 8 years ago

Hi chefnobody,  Thanks for the thought you've clearly put into this. I'm swamped with work at the moment but will try and look at this soon. On initial glance I agree with your comments though :-) Tom

TomThorpe commented 8 years ago

Hi @chefnobody,

Sorry for my brief reply earlier. I've had a quick look at the code and it looks great. On your point about the number formatter you are spot on - what you've done is much better than before so thanks for updating that and fixing my hack!

Merging :-)

Tom

chefnobody commented 8 years ago

Cheers Tom! Thanks!