我正在做一个项目,我需要在单击或按下按钮后禁用 UIButton
。
TIA
最佳答案
在您的 Button
操作方法上,将 Button
的 enabled
设置为 NO
。
- (IBAction)buttonTapped:(UIButton*)sender {
sender.enabled = NO; // With disabled style on button
//If you doesn't want disabled style on button use this.
sender.userInteractionEnabled = NO;
}
关于ios - 按下按钮后禁用 UIButton,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39226326/