Commit 1523b5d4 by Daniel Dahan

master: issue-644: Fixed issue where where Switch.isOn and Switch.switchState…

master: issue-644: Fixed issue where where Switch.isOn and Switch.switchState were not updating correctly.
parent 5a50bc7a
Pod::Spec.new do |s|
s.name = 'Material'
s.version = '2.4.3'
s.version = '2.4.4'
s.license = 'BSD-3-Clause'
s.summary = 'Material is an animation and graphics framework for Google\'s Material Design in Swift.'
s.homepage = 'http://materialswift.com'
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.4.3</string>
<string>2.4.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -186,7 +186,7 @@ open class Switch: UIControl {
return .on == internalSwitchState
}
set(value) {
updateSwitchState(state: .on, animated: true, isTriggeredByUserInteraction: false)
updateSwitchState(state: value ? .on : .off, animated: true, isTriggeredByUserInteraction: false)
}
}
......@@ -196,9 +196,7 @@ open class Switch: UIControl {
return internalSwitchState
}
set(value) {
if value != internalSwitchState {
internalSwitchState = value
}
updateSwitchState(state: value, animated: true, isTriggeredByUserInteraction: false)
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment