How is it possible to set the min max ranges of the UISlider programmatically?
For example (dummy code)
UISlider* slider = [[UISlider alloc] init];
slider.min = -3;
slider.max = 3;
EDIT:
So I have the following:
sl.minimumValue = 5;
NSLog(@"MIN VAL: %d", sl.minimumValue);
This doesn't work, I still get it logging the value 0. Is this because I have set values in interface builder?
Here is it.
UISlider* slider = [[UISlider alloc] init];
slider.minimumValue = -3.0f;
slider.maximumValue = 3.0f;
In the case updating selected values of IBOutlet-ed RangeSeekSlider
rangeSeekSlider.selectedMinValue = 10.0
rangeSeekSlider.selectedMaxValue = 100.0
rangeSeekSlider.setNeedsLayout()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With