The value of the UISlider currently shows as a float. How do I show it as an integer?
sliderCtl = [[UISlider alloc] initWithFrame:frame];
sliderCtl.minimumValue = 1;
sliderCtl.maximumValue = 15;
sliderCtl.continuous = NO;
sliderCtl.value = 1;
[sliderCtl setShowValue:YES];
You could truncate or round the value from the slider and then update it to give the user feedback about the change (it would appear to snap to the integer value when the user releases).
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