EnlargedThumbSlider 0.2.7

EnlargedThumbSlider 0.2.7

Hiroteru Watanabe 维护。



  • HiroteruWatanabe

EnlargedThumbSlider

CI Status Version License Platform

示例

要运行示例项目,请克隆仓库,然后首先从示例目录运行 pod install

功能

EnlargedThumbSlider 仿效了苹果音乐应用中的滑动条行为。当滑动条被高亮时,滑动条的滑块会放大并随着动画改变颜色。

正常状态

高亮状态

使用

func setupSlider() {
// The color is supposed to be the same color as slider's backgroundColor or superview color.
slider.thumbOuterColor = .white // Set the color of the thumb outer side. 

slider.setMinimumTrackTintColor(.darkGray, for: .normal) 
slider.setMinimumTrackTintColor(primaryColor, for: .highlighted)
slider.maximumTrackTintColor = .lightGray 
slider.setCircleThumb(color: .darkGray, for: .normal) 
slider.setCircleThumb(color: primaryColor, for: .highlighted)
}

需求

iOS 10.0 或更高版本

安装

EnlargedThumbSlider 通过 CocoaPods 提供。要安装,只需将以下行添加到您的 Podfile 中

pod 'EnlargedThumbSlider'

作者

HiroteruWatanabe, [email protected]

许可

EnlargedThumbSlider 在 MIT 许可下可用。查看 LICENSE 文件获取更多信息。