Kaynağa Gözat

1.扫描线程问题修复--需要同步到主干

huangxiaodong 2 hafta önce
ebeveyn
işleme
17dab7a4ba

+ 4 - 1
创维盒子/code/Class/Guide/QRCodeScanViewController.m

@@ -241,7 +241,10 @@ AVCaptureDeviceInput *input = [AVCaptureDeviceInput deviceInputWithDevice:device
 //    [self.photoBtn addTarget:self action:@selector(photoBtnClick:) forControlEvents:UIControlEventTouchUpInside];
 //    [self.view addSubview:self.photoBtn];
     //9.开始扫描
-    [self.session startRunning];
+    KWeakSelf
+    globalBlock(^{
+        [weakSelf.session startRunning];
+    });
     
     //添加返回键
     CGFloat btn_w_h  = 40;

+ 5 - 1
创维盒子/code/Class/Guide/ScanToLoginViewController.m

@@ -237,7 +237,11 @@ AVCaptureDeviceInput *input = [AVCaptureDeviceInput deviceInputWithDevice:device
 //    [self.photoBtn addTarget:self action:@selector(photoBtnClick:) forControlEvents:UIControlEventTouchUpInside];
 //    [self.view addSubview:self.photoBtn];
     //9.开始扫描
-    [self.session startRunning];
+    KWeakSelf
+    globalBlock(^{
+        [weakSelf.session startRunning];
+    });
+    
     
     //添加返回键
     CGFloat btn_w_h  = 40;

+ 4 - 1
创维盒子/code/Class/Set/ChangeDevice/QRCodeScanForChangeDeviceViewController.m

@@ -257,7 +257,10 @@ AVCaptureDeviceInput *input = [AVCaptureDeviceInput deviceInputWithDevice:device
 //    [self.photoBtn addTarget:self action:@selector(photoBtnClick:) forControlEvents:UIControlEventTouchUpInside];
 //    [self.view addSubview:self.photoBtn];
     //9.开始扫描
-    [self.session startRunning];
+    KWeakSelf
+    globalBlock(^{
+        [weakSelf.session startRunning];
+    });
     
     //添加返回键
     CGFloat btn_w_h  = 40;

+ 4 - 1
创维盒子/code/mine/scanToPCLoginViewController.m

@@ -197,7 +197,10 @@ AVCaptureDeviceInput *input = [AVCaptureDeviceInput deviceInputWithDevice:device
     [self.session addOutput:guangOutPut];
 
     //9.开始扫描
-    [self.session startRunning];
+    KWeakSelf
+    globalBlock(^{
+        [weakSelf.session startRunning];
+    });
     
     //添加返回键
     CGFloat btn_w_h  = 40;