diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2021-10-12 12:01:29 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2021-11-03 13:30:51 +0100 |
| commit | 8b346e47e952e565c76e48e9f1d8cf77cad3e0cb (patch) | |
| tree | d784238aab67450cb06efa0fd0c421e5cddd7eea | |
| parent | e46e20f1a0979dfc5e8e21faee961287a2ae94b9 (diff) | |
| download | mullvadvpn-8b346e47e952e565c76e48e9f1d8cf77cad3e0cb.tar.xz mullvadvpn-8b346e47e952e565c76e48e9f1d8cf77cad3e0cb.zip | |
CustomSwitch: refactor
| -rw-r--r-- | ios/MullvadVPN/CustomSwitch.swift | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ios/MullvadVPN/CustomSwitch.swift b/ios/MullvadVPN/CustomSwitch.swift index b804dae7ae..e9656c46e7 100644 --- a/ios/MullvadVPN/CustomSwitch.swift +++ b/ios/MullvadVPN/CustomSwitch.swift @@ -28,8 +28,8 @@ class CustomSwitch: UISwitch { override init(frame: CGRect) { super.init(frame: frame) - self.tintColor = .clear - self.onTintColor = .clear + tintColor = .clear + onTintColor = .clear updateThumbColor(isOn: self.isOn, animated: false) @@ -61,7 +61,7 @@ class CustomSwitch: UISwitch { @objc private func valueChanged(_ sender: Any) { if #available(iOS 13, *) { - self.updateThumbColor(isOn: self.isOn, animated: true) + updateThumbColor(isOn: isOn, animated: true) } else { // Wait for animations to finish before changing the thumb color to prevent the jumpy behaviour. CATransaction.setCompletionBlock { |
