CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.

Inchworm 1.1.0

Inchworm 1.1.0

Maintained by Yingtao Guo.



Inchworm 1.1.0

Inchworm

swift 5.0 badge platform iOS badge license MIT badge

Inchworm

A slider for adjusting values just like the one in Photo.app in iOS 13

Inchworm Inchworm Inchworm

Requirements

  • iOS 11.0+
  • Xcode 10.0+

CocoaPods

pod 'Inchworm', '~> 1.0.0'

Usage

  • Create a Slider
let model1 = ProcessIndicatorModel(sliderValueRangeType: .unilateral(limit: 30),
                                   normalIconImage: <NormalIconImage1>,
                                   dimmedIconImage: <DimmedIconImage1>)

let model2 = ProcessIndicatorModel(sliderValueRangeType: .bilateral(limit: 40),
                                   normalIconImage: <NormalIconImage2>,
                                   dimmedIconImage: <DimmedIconImage2>)

let model3 = ProcessIndicatorModel(sliderValueRangeType: .bilateral(limit: 50),
                                   normalIconImage: <NormalIconImage3>,
                                   dimmedIconImage: <DimmedIconImage3>)


let modelList = [model1, model2, model3]

let config = Inchworm.Config()

let board = createSlider(config: config, frame: <Your Frame>, processIndicatorModels: modelList, activeIndex: 1)
  • The caller needs to conform DialBoardDelegate
public protocol SliderDelegate {
func didGetOffsetRatio(_ slider: Inchworm.Slider, activeIndicatorIndex: Int, offsetRatio: Float)
}