renamed methods

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2022-08-22 18:20:20 -05:00
parent d249ba0fed
commit e34f8f0ed8
3 changed files with 7 additions and 7 deletions

View File

@ -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()
}
//--------------------------------------------------

View File

@ -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()

View File

@ -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?()