I have an app with two switch controls to hide or show some textfield depending on their state on or off.
The problem is the first switch seems to control the second one.
If the first switch is off, the second switch is off also. I would like them to work independently from each other. Any advice?
Thanks guys
@IBAction func switchP(_ sender: UISwitch) {
if (sender.isOn == true) {
textFieldP.isHidden = false
} else {
textFieldP.isHidden = true
}
}
@IBAction func switchT(_ sender: UISwitch) {
if (sender.isOn == true) {
textFieldT.isHidden = false
} else {
textFieldT.isHidden = true
}
}