我正在做一个项目,我需要在单击或按下按钮后禁用UIButton
短暂性脑缺血发作

最佳答案

Button操作方法中,将enabledButton设置为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/

10-15 14:39