renamed methods
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
d249ba0fed
commit
e34f8f0ed8
@ -57,9 +57,9 @@ open class RadioButtonBase<ModelType: RadioButtonModel>: SelectorBase<ModelType>
|
||||
}
|
||||
}()
|
||||
|
||||
open override func toggleAndAction() {
|
||||
open override func toggle() {
|
||||
guard !isSelected else { return }
|
||||
super.toggleAndAction()
|
||||
super.toggle()
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
|
||||
@ -226,7 +226,7 @@ open class SelectorBase<ModelType: SelectorModel>: Control<ModelType>, Changable
|
||||
open override func sendActions(for controlEvents: UIControl.Event) {
|
||||
super.sendActions(for: controlEvents)
|
||||
if controlEvents.contains(.touchUpInside) {
|
||||
toggleAndAction()
|
||||
toggle()
|
||||
}
|
||||
}
|
||||
|
||||
@ -235,8 +235,8 @@ open class SelectorBase<ModelType: SelectorModel>: Control<ModelType>, Changable
|
||||
|
||||
}
|
||||
|
||||
/// This will checkbox the state of the Checkbox and execute the actionBlock if provided.
|
||||
open func toggleAndAction() {
|
||||
/// This will checkbox the state of the Selector and execute the actionBlock if provided.
|
||||
open func toggle() {
|
||||
//removed error
|
||||
if hasError && isSelected == false {
|
||||
hasError.toggle()
|
||||
|
||||
@ -317,12 +317,12 @@ open class ToggleBase<ModelType: ToggleModel>: Control<ModelType>, Changable {
|
||||
open override func sendActions(for controlEvents: UIControl.Event) {
|
||||
super.sendActions(for: controlEvents)
|
||||
if controlEvents.contains(.touchUpInside) {
|
||||
toggleAndAction()
|
||||
toggle()
|
||||
}
|
||||
}
|
||||
|
||||
/// This will toggle the state of the Toggle and execute the actionBlock if provided.
|
||||
public func toggleAndAction() {
|
||||
open func toggle() {
|
||||
isOn.toggle()
|
||||
sendActions(for: .valueChanged)
|
||||
onChange?()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user