I need to configure a decimal value so that it displays floats from 1 – 100, like 12.34. Right now, it is only displaying floats between 0 and 1, so that I am getting 0.12.
How to make the change so that the decimal moves two places to the right?
Here is the code for the method for iOS in Xcode 4.2:
- (IBAction)sliderMoved:(UISlider *)slider
{
NSLog(@"The value of the slider is now: %.2f", slider.value);
}
From the interface designer, select your UISlider and change the value range (Minimum and Maximum):