Toggle control that transforms to checkmark on activation.
ActivationToggle requires iOS 8.0 or later.
Using CocoaPods
- Add the pod
ActivationToggle
to your Podfile.
pod 'ActivationToggle'
- Run
pod install
from Terminal, then open your app's.xcworkspace
file to launch Xcode.
Drag ActivationToggle.swift file to your project sources.
Import the module.
import ActivationToggle
Just create a toggle and configure it
override func viewDidLoad() {
super.viewDidLoad()
let toggle = ActivationToggle()
toggle.onColor = UIColor.purple
toggle.offColor = UIColor.darkGray
toggle.toggleColor = UIColor.green
toggle(self, action: #selector(valueChanged(control:)), for: .valueChanged)
view.addSubview(toggle)
}
Build and run the ActivationToggle-Example
project in Xcode to see ActivationToggle
in action.
- Add swipe gesture handling and animations
- If you found a bug, open an issue.
- If you have a feature request, open an issue.
- If you want to contribute, submit a pull request.
Nikita Belosludtcev
This project is available under the Apache License, version 2.0. See the LICENSE file for more info.