We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e88643 commit 7215d56Copy full SHA for 7215d56
Sources/CodeScanner/ScannerViewController.swift
@@ -148,7 +148,7 @@ extension CodeScannerView {
148
149
@objc func updateOrientation() {
150
guard let orientation = view.window?.windowScene?.interfaceOrientation else { return }
151
- guard let connection = captureSession?.connections.last, connection.isVideoOrientationSupported else { return }
+ guard let connection = previewLayer.connection, connection.isVideoOrientationSupported else { return }
152
switch orientation {
153
case .portrait:
154
connection.videoOrientation = .portrait
0 commit comments