iOS 防止按钮多次点击&延迟的执行与取消
2018-03-08 本文已影响159人
JohnayXiao
//这里是关键,点击按钮后先取消之前的操作,再进行需要进行的操作
[[self class] cancelPreviousPerformRequestsWithTarget:self selector:@selector(readEnglish) object:nil];
[self performSelector:@selector(readEnglish)withObject:nil afterDelay:0.75f];