开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜