简体   繁体   中英

How to remove the thumb of UISlider in iphone?

我在相同的视图中有两个UISliders。我的要求是,当用户改变第一个滑块的值时,第二个滑块值应该根据它改变。所以,在第二个滑块中我想隐藏它的拇指。虽然我已经清楚了它的拇指颜色,用户可以看到。我该如何解决?

易一:

[_slider setThumbImage:[UIImage new] forState:UIControlStateNormal];

Simply set the image for the thumb to be nil

UIImage *empty = [UIImage new];
[theSlider setMinimumTrackImage:[UIImage alloc] forState:UIControlStateNormal];
[theSlider setMaximumTrackImage:[UIImage alloc] forState:UIControlStateNormal];

Simply go to xib select slider --> Utilities --> show attributes Inspectors --> Thumb Tint Colour (Clear Thumb tint colour)

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM