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];
}
}
精彩评论