//这里是关键,点击按钮后先取消之前的操作,再进行需要进行的操作
[[self class] cancelPreviousPerformRequestsWithTarget:self selector:@selector(readEnglish) object:nil];
[self performSelector:@selector(readEnglish)withObject:nil afterDelay:0.75f];
//这里是关键,点击按钮后先取消之前的操作,再进行需要进行的操作
[[self class] cancelPreviousPerformRequestsWithTarget:self selector:@selector(readEnglish) object:nil];
[self performSelector:@selector(readEnglish)withObject:nil afterDelay:0.75f];
本文标题:iOS 防止按钮多次点击&延迟的执行与取消
本文链接:https://www.haomeiwen.com/subject/nduefftx.html
网友评论