diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2021-10-13 10:53:39 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2021-11-03 13:30:51 +0100 |
| commit | 352f38dfe7ac228a95e0194df4b55f1ad4a769dc (patch) | |
| tree | 15f2c82621c809ebd8f58f15df7bcd5ac64d27a3 | |
| parent | 6a5c6c864947306669abdada657a629ade36ee7d (diff) | |
| download | mullvadvpn-352f38dfe7ac228a95e0194df4b55f1ad4a769dc.tar.xz mullvadvpn-352f38dfe7ac228a95e0194df4b55f1ad4a769dc.zip | |
Drop BasicTableViewCell
| -rw-r--r-- | ios/MullvadVPN.xcodeproj/project.pbxproj | 4 | ||||
| -rw-r--r-- | ios/MullvadVPN/BasicTableViewCell.swift | 32 | ||||
| -rw-r--r-- | ios/MullvadVPN/SelectLocationCell.swift | 9 | ||||
| -rw-r--r-- | ios/MullvadVPN/SettingsCell.swift | 8 |
4 files changed, 15 insertions, 38 deletions
diff --git a/ios/MullvadVPN.xcodeproj/project.pbxproj b/ios/MullvadVPN.xcodeproj/project.pbxproj index 7593d4c257..b486a0a6e1 100644 --- a/ios/MullvadVPN.xcodeproj/project.pbxproj +++ b/ios/MullvadVPN.xcodeproj/project.pbxproj @@ -204,7 +204,6 @@ 5896AE86246D6AD8005B36CB /* CustomDateComponentsFormattingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5896AE85246D6AD8005B36CB /* CustomDateComponentsFormattingTests.swift */; }; 5896AE88246D7FAF005B36CB /* CustomDateComponentsFormatting.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5896AE83246D5889005B36CB /* CustomDateComponentsFormatting.swift */; }; 5896CEF226972DEB00B0FAE8 /* AccountContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5896CEF126972DEB00B0FAE8 /* AccountContentView.swift */; }; - 589AB4F7227B64450039131E /* BasicTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 589AB4F6227B64450039131E /* BasicTableViewCell.swift */; }; 58A1AA8C23F5584C009F7EA6 /* ConnectionPanelView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58A1AA8B23F5584B009F7EA6 /* ConnectionPanelView.swift */; }; 58A8055E2716EA6700681642 /* AnyIPAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 584D26BE270C550B004EA533 /* AnyIPAddress.swift */; }; 58A8BE81239FBE62006B74AC /* IPEndpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58561C98239A5D1500BD6B5E /* IPEndpoint.swift */; }; @@ -472,7 +471,6 @@ 5896AE83246D5889005B36CB /* CustomDateComponentsFormatting.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomDateComponentsFormatting.swift; sourceTree = "<group>"; }; 5896AE85246D6AD8005B36CB /* CustomDateComponentsFormattingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomDateComponentsFormattingTests.swift; sourceTree = "<group>"; }; 5896CEF126972DEB00B0FAE8 /* AccountContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountContentView.swift; sourceTree = "<group>"; }; - 589AB4F6227B64450039131E /* BasicTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BasicTableViewCell.swift; sourceTree = "<group>"; }; 58A1AA8623F43901009F7EA6 /* Location.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Location.swift; sourceTree = "<group>"; }; 58A1AA8B23F5584B009F7EA6 /* ConnectionPanelView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConnectionPanelView.swift; sourceTree = "<group>"; }; 58A94AE326CFD945001CB97C /* TunnelErrorNotificationProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TunnelErrorNotificationProvider.swift; sourceTree = "<group>"; }; @@ -818,7 +816,6 @@ 58FD5BE624192A2B00112C88 /* AppStoreReceipt.swift */, 58CE5E6A224146210008646E /* Assets.xcassets */, 58FEEB57260B662E00A621A8 /* AutomaticKeyboardResponder.swift */, - 589AB4F6227B64450039131E /* BasicTableViewCell.swift */, 5891BF1B25E3E3EB006D6FB0 /* Bundle+ProductVersion.swift */, 58F840B12464491D0044E708 /* ChainedError.swift */, 587EB669270EFACB00123C75 /* CharacterSet+IPAddress.swift */, @@ -1411,7 +1408,6 @@ 58FD5BF42428C67600112C88 /* InAppPurchaseButton.swift in Sources */, 580EE22424B3243100F9D8A1 /* AsyncBlockOperation.swift in Sources */, 58293FAE2510CA58005D0BB5 /* ProblemReportViewController.swift in Sources */, - 589AB4F7227B64450039131E /* BasicTableViewCell.swift in Sources */, 58B9EB152489139B00095626 /* DisplayChainedError.swift in Sources */, 587B753F2668E5A700DEF7E9 /* NotificationContainerView.swift in Sources */, 5868BD33261DCD2600E6027F /* CustomSplitViewController.swift in Sources */, diff --git a/ios/MullvadVPN/BasicTableViewCell.swift b/ios/MullvadVPN/BasicTableViewCell.swift deleted file mode 100644 index fd506d309d..0000000000 --- a/ios/MullvadVPN/BasicTableViewCell.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// BasicTableViewCell.swift -// MullvadVPN -// -// Created by pronebird on 02/05/2019. -// Copyright © 2019 Mullvad VPN AB. All rights reserved. -// - -import UIKit - -class BasicTableViewCell: UITableViewCell { - - override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { - super.init(style: style, reuseIdentifier: reuseIdentifier) - - let backgroundView = UIView() - backgroundView.backgroundColor = UIColor.Cell.backgroundColor - - let selectedBackgroundView = UIView() - selectedBackgroundView.backgroundColor = UIColor.Cell.selectedBackgroundColor - - self.backgroundView = backgroundView - self.selectedBackgroundView = selectedBackgroundView - backgroundColor = UIColor.clear - contentView.backgroundColor = UIColor.clear - } - - required init?(coder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - -} diff --git a/ios/MullvadVPN/SelectLocationCell.swift b/ios/MullvadVPN/SelectLocationCell.swift index 1cfb71f45b..9cae5a6cfa 100644 --- a/ios/MullvadVPN/SelectLocationCell.swift +++ b/ios/MullvadVPN/SelectLocationCell.swift @@ -11,7 +11,7 @@ import UIKit private let kCollapseButtonWidth: CGFloat = 24 private let kRelayIndicatorSize: CGFloat = 16 -class SelectLocationCell: BasicTableViewCell { +class SelectLocationCell: UITableViewCell { typealias CollapseHandler = (SelectLocationCell) -> Void let locationLabel = UILabel() @@ -96,6 +96,13 @@ class SelectLocationCell: BasicTableViewCell { indentationWidth = UIMetrics.cellIndentationWidth backgroundColor = .clear + contentView.backgroundColor = .clear + + backgroundView = UIView() + backgroundView?.backgroundColor = UIColor.Cell.backgroundColor + + selectedBackgroundView = UIView() + selectedBackgroundView?.backgroundColor = UIColor.Cell.selectedBackgroundColor locationLabel.font = UIFont.systemFont(ofSize: 17) locationLabel.textColor = .white diff --git a/ios/MullvadVPN/SettingsCell.swift b/ios/MullvadVPN/SettingsCell.swift index 8bac28f783..8e25b9c387 100644 --- a/ios/MullvadVPN/SettingsCell.swift +++ b/ios/MullvadVPN/SettingsCell.swift @@ -8,7 +8,7 @@ import UIKit -class SettingsCell: BasicTableViewCell { +class SettingsCell: UITableViewCell { let titleLabel = UILabel() let detailTitleLabel = UILabel() @@ -16,9 +16,15 @@ class SettingsCell: BasicTableViewCell { override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { super.init(style: style, reuseIdentifier: reuseIdentifier) + backgroundView = UIView() backgroundView?.backgroundColor = UIColor.Cell.backgroundColor + + selectedBackgroundView = UIView() selectedBackgroundView?.backgroundColor = UIColor.Cell.selectedAltBackgroundColor + separatorInset = .zero + backgroundColor = .clear + contentView.backgroundColor = .clear titleLabel.translatesAutoresizingMaskIntoConstraints = false titleLabel.font = UIFont.systemFont(ofSize: 17) |
