I'm new to swift programming and I'm trying to disable the save button until all other required buttons are selected, but when I try to do that with the button.isEnabled = false, it doesn't change even when all the buttons are selected. here is a sample code:
func disableButton () {
if firstButton.isSelected && rightButton.isSelected {
saveButton.isEnabled = true
} else {
saveButton.isEnabled = false
}
}
when I remove the last line the save button works but when I put it back it's disabled even when the two other buttons are selected.
