HUMSlideriOS 滑杆控制
HUMSlider 是滑杆控制,可以自动显示进度和在终端显示状态图片。
要使用此控件,强烈建议使用 CocoaPods。为此,请将以下内容添加到Podfile:
pod 'HUMSlider', ~>'1.0'
然后pod install。
##用法
最常见用例的快速编程示例:
HUMSlider *slider = [[HUMSlider alloc] init];
// Set the images to be saturated and desaturated
slider.minimumValueImage = [UIImage imageNamed:@"minImage"];
slider.maximumValueImage = [UIImage imageNamed:@"maxImage"];
// What color should the image be when the thumb is close to it?
slider.saturatedColor = [UIColor greenColor];
// What color should the image be when the thumb is not close to it?
slider.desaturatedColor = [[UIColor redColor] colorWithAlpha:0.5f];
// How many ticks do you want?
slider.sectionCount = 11; // This should be an odd number.
// What color should the ticks be?
slider.tickColor = [UIColor blackColor];
此仓库中包含的示例应用程序中提供了完整代码。
评论
