aboutsummaryrefslogtreecommitdiffstats
path: root/Sources/WireGuardApp/UI/iOS/View/KeyValueCell.swift
diff options
context:
space:
mode:
authorAlessio Nossa <alessio.nossa@gmail.com>2024-02-28 10:28:12 +0100
committerAlessio Nossa <alessio.nossa@gmail.com>2024-02-28 10:28:12 +0100
commita37ae8a99b9edb363eb084e17eec35f3c4761313 (patch)
tree06b2db1fd7565b9d615c2e79ba022e3cc7c3f690 /Sources/WireGuardApp/UI/iOS/View/KeyValueCell.swift
parentRemove backward compatibility of GetPeers with SiriKit version (diff)
parentApp: version bump (diff)
downloadwireguard-apple-an/shortcuts-integration.tar.xz
wireguard-apple-an/shortcuts-integration.zip
Merge branch 'master' into an/shortcuts-integrationan/shortcuts-integration
Diffstat (limited to 'Sources/WireGuardApp/UI/iOS/View/KeyValueCell.swift')
-rw-r--r--Sources/WireGuardApp/UI/iOS/View/KeyValueCell.swift28
1 files changed, 6 insertions, 22 deletions
diff --git a/Sources/WireGuardApp/UI/iOS/View/KeyValueCell.swift b/Sources/WireGuardApp/UI/iOS/View/KeyValueCell.swift
index e8c3850..ab1a71f 100644
--- a/Sources/WireGuardApp/UI/iOS/View/KeyValueCell.swift
+++ b/Sources/WireGuardApp/UI/iOS/View/KeyValueCell.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import UIKit
@@ -9,11 +9,7 @@ class KeyValueCell: UITableViewCell {
let keyLabel = UILabel()
keyLabel.font = UIFont.preferredFont(forTextStyle: .body)
keyLabel.adjustsFontForContentSizeCategory = true
- if #available(iOS 13.0, *) {
- keyLabel.textColor = .label
- } else {
- keyLabel.textColor = .black
- }
+ keyLabel.textColor = .label
keyLabel.textAlignment = .left
return keyLabel
}()
@@ -35,11 +31,7 @@ class KeyValueCell: UITableViewCell {
valueTextField.autocapitalizationType = .none
valueTextField.autocorrectionType = .no
valueTextField.spellCheckingType = .no
- if #available(iOS 13.0, *) {
- valueTextField.textColor = .secondaryLabel
- } else {
- valueTextField.textColor = .gray
- }
+ valueTextField.textColor = .secondaryLabel
return valueTextField
}()
@@ -64,18 +56,10 @@ class KeyValueCell: UITableViewCell {
var isValueValid = true {
didSet {
- if #available(iOS 13.0, *) {
- if isValueValid {
- keyLabel.textColor = .label
- } else {
- keyLabel.textColor = .systemRed
- }
+ if isValueValid {
+ keyLabel.textColor = .label
} else {
- if isValueValid {
- keyLabel.textColor = .black
- } else {
- keyLabel.textColor = .red
- }
+ keyLabel.textColor = .systemRed
}
}
}