开发者

UISlider thumb image issue..!

How can we set the thumb image of UISli开发者_Python百科der to stop once it reaches the max value .i.e once the thumb image reaches the max value(at the end) user should not be able to move the thumb image.


Something like the following:

[slider setContinuous:YES];
[slider addTarget:self action:@selector(sliderChanged:) forControlEvents:UIControlEventValueChanged];

and then

- (void)sliderChanged:(UISlider*)sender {
    if ([slider value] >= [slider maximumValue]) {
      [slider setEnabled:NO];
    }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜