Select UITableView's row when tapping on its UISwitch in Swift
问题 This question has been approached here in Objective-C. But I am working in Swift and have a similar question. Once successfully created, how do I select the UITableView's row when I tap on its UISwitch? I have a boolean in my model and would like to toggle that boolean based on the switches on/off state. I have some programmatically created cells that contain switches... View Controller: var settings : [SettingItem] = [ SettingItem(settingName: "Setting 1", switchState: true), SettingItem