diff options
Diffstat (limited to 'WireGuard/WireGuard/UI/iOS/ViewController/QRScanViewController.swift')
-rw-r--r-- | WireGuard/WireGuard/UI/iOS/ViewController/QRScanViewController.swift | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/WireGuard/WireGuard/UI/iOS/ViewController/QRScanViewController.swift b/WireGuard/WireGuard/UI/iOS/ViewController/QRScanViewController.swift index 1e231ec..e4b6287 100644 --- a/WireGuard/WireGuard/UI/iOS/ViewController/QRScanViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/ViewController/QRScanViewController.swift @@ -76,15 +76,11 @@ class QRScanViewController: UIViewController { super.viewDidLayoutSubviews() if let connection = previewLayer?.connection { - - let currentDevice: UIDevice = UIDevice.current - - let orientation: UIDeviceOrientation = currentDevice.orientation - - let previewLayerConnection: AVCaptureConnection = connection + let currentDevice = UIDevice.current + let orientation = currentDevice.orientation + let previewLayerConnection = connection if previewLayerConnection.isVideoOrientationSupported { - switch orientation { case .portrait: previewLayerConnection.videoOrientation = .portrait |