소스 검색

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;