У меня есть пользовательский tableViewCell
с textField
и только один переключатель, который не является частью tableViewCell
.
Так что я хочу делать, когда включаю и выключаю, тогда мой tableViewCell
textFields
отключен и включен.Так как я могу это сделать ??
@IBAction func switchServiceTax_Action(_ sender: UISwitch) {
let cell : tbleCell = tblViewServices.dequeueReusableCell(withIdentifier: "cell") as! tbleCell
if switch.isOn{
cell.txtFld.isUserInteractionEnabled = true
tblView.reloadData()
}else{
cell.txtFld.isUserInteractionEnabled = false
tblView.reloadData()
}
}