[Solved] How to get boolean value from switch state?
You can simply call switch.isOn to get the state of the UISwitch, but you should rather create an IBAction for your UISwitch, which will be called every time the state of the Switch changes. You can store the switch state in a computed property if you don’t need to be notified every time the state … Read more