Swiftpack.co -  edgar-zigis/GaugeSlider as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
edgar-zigis/GaugeSlider
Highly customizable GaugeSlider designed for a Smart Home app. Featured at Medium.
.package(url: "https://github.com/edgar-zigis/GaugeSlider.git", from: "1.2.1")

GaugeSlider

Highly customizable GaugeSlider primarily designed for a Smart Home app.

Minimum iOS version 11.0

alt text

Carthage

github "edgar-zigis/GaugeSlider" ~> 1.2.1

Cocoapods

pod 'GaugeSlider', '~> 1.2.1'

Swift Package Manager

dependencies: [
    .package(url: "https://github.com/edgar-zigis/GaugeSlider.git", .upToNextMajor(from: "1.2.1"))
]

Usage

let v = GaugeSliderView()
v.blankPathColor = UIColor(red: 218/255, green: 218/255, blue: 218/255, alpha: 1) //  -> inactive track color
v.fillPathColor = UIColor(red: 74/255, green: 196/255, blue: 192/255, alpha: 1) //  -> filled track color
v.indicatorColor = UIColor(red: 94/255, green: 187/255, blue: 169/255, alpha: 1)
v.unitColor = UIColor(red: 74/255, green: 74/255, blue: 74/255, alpha: 1)
v.placeholderColor = UIColor(red: 139/255, green: 154/255, blue: 158/255, alpha: 1)
v.unitIndicatorColor = UIColor(red: 74/255, green: 74/255, blue: 74/255, alpha: 0.2)
v.customControlColor = UIColor(red: 47/255, green: 190/255, blue: 169/255, alpha: 1)
v.unitFont = UIFont.systemFont(ofSize: 67)
v.placeholderFont = UIFont.systemFont(ofSize: 17, weight: .medium)
v.unitIndicatorFont = UIFont.systemFont(ofSize: 16, weight: .medium)
v.customControlButtonTitle = "• Auto"
v.isCustomControlActive = false
v.customControlButtonVisible = true
v.placeholder = "Warming"
v.unit = "°"  //  -> change default unit from temperature to anything you like
v.progress = 80 //  -> 0..100 a way to say percentage
v.value = 10
v.minValue = 5
v.maxValue = 25
v.countingMethod = GaugeSliderCountingMethod.easeInOut // -> sliding animation style
v.delegationMode = .singular //  -> or .immediate(interval: Int)
v.leftIcon = UIImage(named: "snowIcon")
v.rightIcon = UIImage(named: "sunIcon")

Remarks

It can be used both programmatically and with story boards. Samples are available at GaugeSliderTest

GitHub

link
Stars: 101
Last commit: 3 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Submit a free job ad (while I'm testing this). The analytics numbers for this website are here.

Release Notes

1.0.0
3 weeks ago

New features

  • Initial release

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics