CPSlider - UISlider 的改进版


MIT
iOS
Objective-C

软件简介

CPSlider 是 UISlider 的改进版,is a drop-in, subclass replacement for UISlider that
allows varying scrubbing speeds as the user drags away from the slider thumb,
emulating the slider used in the iOS iPod music player. It also includes
delegate callbacks to allow an object to be notified of scrubbing speed
changes.

实例代码:

CPSlider *slider = [[CPSlider alloc] initWithFrame:CGRectMake(18, 166, 284, 23)];
slider.minimumValue = 0.0f;
slider.maximumValue = 1.0f;
[self.view addSubview:slider]
[self.slider addTarget:self action:@selector(sliderValueDidChange:) forControlEvents:UIControlEventValueChanged];