Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 618
Pathetic Learner Avatar asked Dec 22 '22 03:12

Pathetic Learner


1 Answers

try this

[slider setValue:100.0f animated:NO];
like image 84
X Slash Avatar answered Jan 09 '23 02:01

X Slash