我 UIButton
使用 + buttonWithType:
我需要弄清楚的是如何手动更改按钮状态。有时我需要将其设置为“已禁用”。
我通读了 UIButton
文档,但似乎找不到任何关于手动设置按钮状态的信息。
如有任何想法,我们将不胜感激。
最佳答案
您尝试过 button.enabled = NO;
吗?
swift 5.0
button.isEnabled = false
关于ios - 手动设置 UIButton 状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/405134/