Search code examples
iphoneiosios4slideruislider

Setting slider to max value


I am creating an application of light in which i am displaying image of light. On light i am changing the brightness of light. If i set my slider minimum and maximum value as

slider.minimumValue = -100;
slider.maximumValue = 100;

then slider shows marker at 0th position which displays as in center.But now my slider initial and maximum value has been changed as

slider.minimumValue = 0;
slider.maximumValue = 100;

I want my slider marker should be initially at 100th position of slider i.e. on the top position of slider.

Please help me to solve this problem.


Solution

  • try this

    [slider setValue:100.0f animated:NO];