开发者

Disable UIButton with a specific tag

开发者 https://www.devze.com 2023-03-02 22:43 出处:网络
I want to disable a button with a specific tag, I try this code: UIButton *button = (UIButton *)[self.view viewWithTag:33];

I want to disable a button with a specific tag, I try this code:

UIButton *button = (UIButton *)[self.view viewWithTag:33];
[button setEnabled:FALSE];

but It don't 开发者_运维问答work, why?


Try to debug and see if there is an address for the button. Worst case, u can also try using NO, instead of FALSE.

0

精彩评论

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