Search code examples
iphoneiosrubyrubymotion

How to customize a UISlider with Rubymotion?


Referencing the documentation you can change properties of the UISlider in many ways.

How would you edit a slider in Rubymotion to set for instance a minimumValueImage?

slider = UISlider.alloc.initWithFrame([[50, 50], [200, 40]])
# ???

Solution

  • mininumValueImage is a property of UISlider. So you can set it like this:

    slider.minimumValueImage = UIImage.imageNamed("sliderMinValueImage")