diff options
Diffstat (limited to '')
-rw-r--r-- | WireGuard/WireGuard/UI/iOS/ViewController/QRScanViewController.swift | 10 | ||||
-rw-r--r-- | WireGuard/WireGuard/UI/iOS/ViewController/TunnelsListTableViewController.swift | 2 |
2 files changed, 4 insertions, 8 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 diff --git a/WireGuard/WireGuard/UI/iOS/ViewController/TunnelsListTableViewController.swift b/WireGuard/WireGuard/UI/iOS/ViewController/TunnelsListTableViewController.swift index c07657f..9dea8b0 100644 --- a/WireGuard/WireGuard/UI/iOS/ViewController/TunnelsListTableViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/ViewController/TunnelsListTableViewController.swift @@ -127,7 +127,7 @@ class TunnelsListTableViewController: UIViewController { present(alert, animated: true, completion: nil) } - @objc func settingsButtonTapped(sender: UIBarButtonItem!) { + @objc func settingsButtonTapped(sender: UIBarButtonItem) { guard tunnelsManager != nil else { return } let settingsVC = SettingsTableViewController(tunnelsManager: tunnelsManager) |