iOS 控制点击事件触发时间间隔

//按钮第二次点击事件触发的等待时间
#define Button_Seconds_Time(_seconds_) \
static BOOL shouldPrevent; \
if (shouldPrevent) return; \
shouldPrevent = YES; \
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)((_seconds_) * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ \
shouldPrevent = NO; \
}); \

猜你喜欢

转载自blog.csdn.net/saw471/article/details/81075668
今日推荐