Last active
March 31, 2024 18:00
-
-
Save TheCodedSelf/c4f3984dd9fcc015b3ab2f9f60f8ad51 to your computer and use it in GitHub Desktop.
Disable Alert Controller button if Alert Controller text field is empty or whitespace
I get error: Cannot infer contextual base in reference to member 'UITextField'
thank you.
really cool, thanks.
I would add
okAction.isEnabled = false
before add it toalertController
since the TextField appears empty the first time.
I second this. The OK button will start out as enabled if this is not done. Minor line of code but pretty essential given the purpose of the whole procedure.
Pretty neat. I didn't want to create a new method in an already clustered viewcontroller.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I changed, but anyway I get Type of expression is ambiguous without more context"