I am new to iPhone development. I am building an app by using Xcode but now would like to disable a button. How is this possible?
myButton.enabled = NO;
Via code:
myButton.enabled = NO;
If you're using interface builder there's an "enabled" option.
If you are looking for a Swift 3.0 solution:
button.isEnabled = false
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With