diff --git a/Sources/CommonAppleKit/CommonAppleKit.swift b/Sources/CommonAppleKit/CommonAppleKit.swift index fdc5253..706abee 100644 --- a/Sources/CommonAppleKit/CommonAppleKit.swift +++ b/Sources/CommonAppleKit/CommonAppleKit.swift @@ -217,7 +217,17 @@ public extension CASwitch { var isOn: Bool { - state == .on + get { + state == .on + } + + set { + if newValue { + state = .on + } else { + state = .off + } + } } }