CocoaPods trunk is moving to be read-only. Read more on the blog, there are 14 months to go.
| TestsTested | ✗ |
| LangLanguage | SwiftSwift |
| License | MIT |
| ReleasedLast Release | Sep 2016 |
| SPMSupports SPM | ✗ |
Maintained by Finn Gaida.
So I came across this awesome, kinda skeuomorphic-ish custom switch design on Dribbble and thought it was cute, so here you go:
DayNightSwitch.swift file in your project and UIView into your storyboard and set its class to DayNightButton or create an instance of the switch like so: let dayNightSwitch = DayNightSwitch(center: self.view.center)
dayNightSwitch.changeAction = { on in
print("The switch is now " + (on ? "on" : "off"))
}
self.view.addSubview(dayNightSwitch)
MIT.