diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-12-21 23:34:56 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-12-21 23:34:56 +0100 |
commit | 7b9d4cb9e35a88f13face71543ce4773102fe224 (patch) | |
tree | 90810e67570a1bd2b520f352b50117925d3b1fab /WireGuard/WireGuard/UI/iOS/View/SwitchCell.swift | |
parent | providerConfiguration is now a WgQuickConfig (diff) | |
download | wireguard-apple-7b9d4cb9e35a88f13face71543ce4773102fe224.tar.xz wireguard-apple-7b9d4cb9e35a88f13face71543ce4773102fe224.zip |
Nuke trailing spaces
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r-- | WireGuard/WireGuard/UI/iOS/View/SwitchCell.swift | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/WireGuard/WireGuard/UI/iOS/View/SwitchCell.swift b/WireGuard/WireGuard/UI/iOS/View/SwitchCell.swift index d0c29aa..68939a7 100644 --- a/WireGuard/WireGuard/UI/iOS/View/SwitchCell.swift +++ b/WireGuard/WireGuard/UI/iOS/View/SwitchCell.swift @@ -19,14 +19,14 @@ class SwitchCell: UITableViewCell { textLabel?.textColor = value ? .black : .gray } } - + var onSwitchToggled: ((Bool) -> Void)? - + let switchView = UISwitch() - + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { super.init(style: .default, reuseIdentifier: reuseIdentifier) - + accessoryView = switchView switchView.addTarget(self, action: #selector(switchToggled), for: .valueChanged) } @@ -34,11 +34,11 @@ class SwitchCell: UITableViewCell { required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } - + @objc func switchToggled() { onSwitchToggled?(switchView.isOn) } - + override func prepareForReuse() { super.prepareForReuse() isEnabled = true |