iOS解决按钮短时间内多次点击只触发一次事件方法

- (void)unisversalButtonAcrion:(UIButton *)sender
{
    [[self class] cancelPreviousPerformRequestsWithTarget:self selector:@selector(todoSomething:) object:sender];
    [self performSelector:@selector(todoSomething:) withObject:sender afterDelay:0.3f];
}

- (void)todoSomething:(UIButton *)sender {
    if (self.bindIngBankCarBlock) {
        self.bindIngBankCarBlock();
    }
}

 

iOS解决按钮短时间内多次点击只触发一次事件方法

上一篇:iOS与H5交互(WKWbebView)


下一篇:Win如何查看某个端口被谁占用并停掉