aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/UI
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--WireGuard/WireGuard/UI/TunnelViewModel.swift2
-rw-r--r--WireGuard/WireGuard/UI/iOS/View/ButtonCell.swift2
-rw-r--r--WireGuard/WireGuard/UI/iOS/ViewController/QRScanViewController.swift10
-rw-r--r--WireGuard/WireGuard/UI/iOS/ViewController/TunnelsListTableViewController.swift2
4 files changed, 6 insertions, 10 deletions
diff --git a/WireGuard/WireGuard/UI/TunnelViewModel.swift b/WireGuard/WireGuard/UI/TunnelViewModel.swift
index 1a88da2..71cb18e 100644
--- a/WireGuard/WireGuard/UI/TunnelViewModel.swift
+++ b/WireGuard/WireGuard/UI/TunnelViewModel.swift
@@ -361,7 +361,7 @@ class TunnelViewModel {
var peersData: [PeerData]
init(tunnelConfiguration: TunnelConfiguration?) {
- let interfaceData: InterfaceData = InterfaceData()
+ let interfaceData = InterfaceData()
var peersData = [PeerData]()
if let tunnelConfiguration = tunnelConfiguration {
interfaceData.validatedConfiguration = tunnelConfiguration.interface
diff --git a/WireGuard/WireGuard/UI/iOS/View/ButtonCell.swift b/WireGuard/WireGuard/UI/iOS/View/ButtonCell.swift
index 4702993..aff17ee 100644
--- a/WireGuard/WireGuard/UI/iOS/View/ButtonCell.swift
+++ b/WireGuard/WireGuard/UI/iOS/View/ButtonCell.swift
@@ -33,7 +33,7 @@ class ButtonCell: UITableViewCell {
button.topAnchor.constraint(equalTo: contentView.layoutMarginsGuide.topAnchor),
contentView.layoutMarginsGuide.bottomAnchor.constraint(equalTo: button.bottomAnchor),
button.centerXAnchor.constraint(equalTo: contentView.centerXAnchor)
- ])
+ ])
button.addTarget(self, action: #selector(buttonTapped), for: .touchUpInside)
}
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)