aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/UI/iOS
diff options
context:
space:
mode:
authorEric Kuck <eric@bluelinelabs.com>2018-12-20 11:22:37 -0600
committerEric Kuck <eric@bluelinelabs.com>2018-12-20 11:22:37 -0600
commita89ad959016c394c3b30b30598bf9ebff2ad1911 (patch)
tree03d72cef3084a90d20cdd8e6c371c2c58206d2c4 /WireGuard/WireGuard/UI/iOS
parentAdded a String->[String] helper (diff)
downloadwireguard-apple-a89ad959016c394c3b30b30598bf9ebff2ad1911.tar.xz
wireguard-apple-a89ad959016c394c3b30b30598bf9ebff2ad1911.zip
Enabled more swiftlint rules
Signed-off-by: Eric Kuck <eric@bluelinelabs.com>
Diffstat (limited to '')
-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
3 files changed, 5 insertions, 9 deletions
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)