在app 注册或者登录 需要验证码的地方、为了避免短时间内刷验证码、往往会加上一层验证。
倒计时结束后、可以重新获取!
代码实现如下:
// _CountdownTime 倒计时总时间;
//_timer 定时器
- (void)startTime:(UIButton *)VerificationCodeButton
{
__block NSInteger timeout = [_CountdownTime integerValue];
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY