SwiftlyScrollSlider
用于 UIScrollView 的自定义滚动滑块。
安装
CocoaPods:
pod 'SwiftlyScrollSlider'
手动:
Just copy the SwiftlyScrollSlider.swift into your project.
使用
使用非常简单。请在 Storyboard 或 XIB 中为滚动滑块创建一个 UITextView 和 UIView 的示例,并将类设置为 SwiftlyScrollSlider。
UITextView 的代理应该是 SwiftlyScrollSlider。
就是这样。
自定义示例
scrollSlider.thumbImageView?.image = UIImage(named: "ScrollSliderCustom.png") // Change an image of the scroll slider scrollSlider.lineBackgroundView?.backgroundColor = UIColor.yellowColor() // A color of the line scrollSlider.lineBackgroundView?.layer.borderColor = UIColor.yellowColor().CGColor // A border of the line color
您可以在本仓库中轻松找到示例。
许可证
SwiftlyScrollSlider 以下 MIT 许可证提供。有关更多信息,请参阅 LICENSE 文件。