labelSwitchOne.delegate = self
labelSwitchOne.switchConfiguration = SwitchConfiguration(leftText: nil,
leftColor: #colorLiteral(red: 0.2588235438, green: 0.7568627596, blue: 0.9686274529, alpha: 1),
rightText: nil,
rightColor: #colorLiteral(red: 0.9529411793, green: 0.6862745285, blue: 0.1333333403, alpha: 1),
font: .boldSystemFont(ofSize: 5),
textColor: #colorLiteral(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0),
circleColor: #colorLiteral(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0),
innerCircle: true,
currentState: .Right)
extension ViewController: LableSwitchDelegate {
// MARK:- LableSwitchDelegate
func didTapLabelSwitch(state: SwitchState, labelSwitch: ToggleSwitch) {
switch labelSwitch {
case labelSwitchOne:
print("---labelSwitchOne State is \(state)---")
case labelSwitchTwo:
print("---labelSwitchTwo State is \(state)---")
default:
print("---Nothing---")
}
}
}
forked from Nova-Corp/Toggle-Switch-With-Label
-
Notifications
You must be signed in to change notification settings - Fork 0
Awesome Toggle Switch
License
shanmugam105/Toggle-Switch-With-Label
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Awesome Toggle Switch
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published
Languages
- Swift 92.1%
- Ruby 4.7%
- Objective-C 3.2%