In my UITableViewController I have a custom cell which contains a switcher which is the following:
import Foundation import UIKit class SwitchCell: UITableV
In Swift4.0
mySwitch.addTarget(self, action: #selector(valueChange), for:UIControlEvents.valueChanged) @objc func valueChange(mySwitch: UISwitch) { let value = mySwitch.isOn // Do something print("switch value changed \(value)") }