ios toggle switch code example
Example: switches xcode
@IBAction func switchO(_ sender: Any) {
if ((sender as AnyObject).isOn == true) {
labelO.text = "Yes I Do" } else {
labelO.text = "No I Do Not"
}
}
@IBAction func switchO(_ sender: Any) {
if ((sender as AnyObject).isOn == true) {
labelO.text = "Yes I Do" } else {
labelO.text = "No I Do Not"
}
}