Skip to content

Commit 7880629

Browse files
committed
fix(barcode-scanner): fix the cameraView is not removed after scanning in iOS
1 parent 9229f99 commit 7880629

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

plugins/barcode-scanner/ios/Sources/BarcodeScannerPlugin.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ class BarcodeScannerPlugin: Plugin, AVCaptureMetadataOutputObjectsDelegate {
170170
if self.captureSession != nil {
171171
self.captureSession!.stopRunning()
172172
self.cameraView.removePreviewLayer()
173+
self.cameraView.removeFromSuperview()
173174
self.captureVideoPreviewLayer = nil
174175
self.metaOutput = nil
175176
self.captureSession = nil

0 commit comments

Comments
 (0)