-(void)timeEnough:(UIButton *)btn
{
btn.selected = NO;
}
-(void)btnClick:(UIButton *)btn
{
if (btn.selected)return;
btn.selected = YES;
[self performSelector:@selector(timeEnough:) withObject:nil afterDelay:3.0];
//你要實現的button點擊事件
}
這樣的效果就是該button在3秒內只能觸發一次點擊事件,防止button點擊頻率過快.