Answers for "is on switch button swift"

1

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"
    }  
}
Posted by: Guest on April-11-2020
0

switch button swift 5

@IBAction func switch(_ sender: Any) {
          if ((sender as AnyObject).isOn == true) {
         //Yes
          } else {
            //No
          }
    }
Posted by: Guest on December-22-2020

Code answers related to "Swift"

Browse Popular Code Answers by Language