我希望防止连续多次点击UIButton.
我试过enabled和exclusiveTouch属性但它没有用.如:
-(IBAction) buttonClick:(id)sender{
button.enabled = false;
[UIView animateWithDuration:1.0 delay:0.0 options:UIViewAnimationOptionAllowAnimatedContent animations:^{
// code to execute
}
completion:^(BOOL finished){
// code to execute
}];
button.enabled = true;
}
Run Code Online (Sandbox Code Playgroud)