瀏覽代碼

1.分享防止重复点击

huangxiaodong 1 年之前
父節點
當前提交
9f12805c8c
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      创维盒子/双子星云手机/Class/Set/previewFile/view/editShareView.m

+ 6 - 0
创维盒子/双子星云手机/Class/Set/previewFile/view/editShareView.m

@@ -220,6 +220,12 @@
 {
     NSInteger tag = but.tag;
     
+    //防止重复点击
+    but.userInteractionEnabled = NO;
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        but.userInteractionEnabled = YES;
+    });
+    
     if(tag==1 && !_day7Button.selected){
         _day7Button.selected = YES;
         _dayForeverButton.selected = NO;