3

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.

mat
  • 41
  • 1
  • 4

1 Answers1

2

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.

Timothy
  • 4,467
  • 5
  • 28
  • 51