我有一个自定义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()
}
}
Run Code Online (Sandbox Code Playgroud)