[[self class] cancelPreviousPerformRequestsWithTarget:self selector:@selector(todoSomething:) object:btn]; [self performSelector:@selector(todoSomething:) withObject:btn afterDelay:0.2f];
在0.2秒时间间隔内多次点击只响应一次点击事件
最新推荐文章于 2019-07-01 17:08:27 发布
[[self class] cancelPreviousPerformRequestsWithTarget:self selector:@selector(todoSomething:) object:btn]; [self performSelector:@selector(todoSomething:) withObject:btn afterDelay:0.2f];