lxy il y a 1 an
Parent
commit
f5067bec9c

+ 7 - 1
LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSBaseViewController.m

@@ -181,6 +181,10 @@
         make.height.mas_offset(20);
     }];
     [self.view addSubview:self.authView];
+    __weak typeof(self) weakSelf = self;
+    self.authView.closeBlock = ^{
+        weakSelf.panGesture.enabled = YES;
+    };
     [self.authView mas_makeConstraints:^(MASConstraintMaker *make) {
         make.edges.mas_offset(0);
     }];
@@ -1154,6 +1158,7 @@
             break;
     }
     if (showVideoAlert && showAlert) {
+        self.panGesture.enabled = NO;
         [self.authView showAutherWith:PCSAuthPhoneAndMir];
         return  YES;
     }
@@ -1167,6 +1172,7 @@
     switch (staus) {
         case AVAuthorizationStatusDenied:{
             [self.authView showAutherWith:PCSAuthPhone];
+            self.panGesture.enabled = NO;
 
 //            [self showAlertForAuthorizationWithText:@"请在系统设置里打开摄像机访问权限后重试"];
             showAlert =  YES;
@@ -1186,7 +1192,7 @@
 
         case AVAuthorizationStatusDenied:{
             [self.authView showAutherWith:PCSAuthMir];
-
+            self.panGesture.enabled = NO;
 //            [self showAlertForAuthorizationWithText:@"请在系统设置里打开麦克风访问权限后重试"];
             showAlert =  YES;
             break;

+ 3 - 1
LenzCameraNativeModuleForRN/Classes/inner/UI/PCSAutherView.h

@@ -17,9 +17,11 @@ typedef NS_ENUM(NSInteger, PCSAuthType) {
     
 };
 
-@interface PCSAutherView : UIView
+typedef void(^PCSAutherViewCloseBlock)(void);
 
+@interface PCSAutherView : UIView
 
+@property (nonatomic)PCSAutherViewCloseBlock closeBlock;
 - (void)showAutherWith:(PCSAuthType)type;
 
 @end

+ 3 - 0
LenzCameraNativeModuleForRN/Classes/inner/UI/PCSAutherView.m

@@ -53,6 +53,9 @@
 }
 
 - (void)closeAction {
+    if (self.closeBlock) {
+        self.closeBlock();
+    }
     self.hidden = YES;
 }
 - (void)authButtonAction {