代碼
// 取消之前執(zhí)行的方法
[[self class] cancelPreviousPerformRequestsWithTarget:self selector:@selector(action) object:nil];
// 執(zhí)行方法
[self performSelector:@selector(action) withObject:nil afterDelay:0.1f];
// 取消之前執(zhí)行的方法
[[self class] cancelPreviousPerformRequestsWithTarget:self selector:@selector(action) object:nil];
// 執(zhí)行方法
[self performSelector:@selector(action) withObject:nil afterDelay:0.1f];