Disable buttons after clicking a button
I am 开发者_如何转开发working on a quiz app and I need to find a way to disable specific buttons in my UIView controller when I press on the correct answer i.e a button. Is there a way to accomplish this?
Relevant code:
myButton.enabled = NO;
but I do not have IBOutlets, I have IBActions.
simply create an IBOutlet in the class where your IBAction is, and bind the IBOutlet to you button. then you can use your referring code.
精彩评论