Steven 6 months ago
parent
commit
b1ba4afc65

+ 5 - 1
KulexiuForStudent/KulexiuForStudent/Module/Mine/Scan/Controller/KSScanViewController.m

@@ -27,7 +27,6 @@
 
 @property (nonatomic, strong) UIView *maskView;
 
-
 @end
 
 @implementation KSScanViewController
@@ -45,6 +44,11 @@
     [self startScan];
 }
 
+- (void)viewWillDisappear:(BOOL)animated {
+    [super viewWillDisappear:animated];
+    [self.scanManager stopScanning];
+}
+
 - (void)startScan {
     MJWeakSelf;
     [self.scanManager startScanningQRCodeWithInView:self.view scanView:self.scanView resultCallback:^(NSString *result) {