updated
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
b82b170c80
commit
91685c4c59
@ -158,7 +158,7 @@ open class SelectorBase<ModelType: SelectorModel>: Control<ModelType>, Changable
|
|||||||
|
|
||||||
open override func setup() {
|
open override func setup() {
|
||||||
super.setup()
|
super.setup()
|
||||||
self.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(Self.toggleAndAction)))
|
self.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(Self.tap)))
|
||||||
|
|
||||||
isAccessibilityElement = true
|
isAccessibilityElement = true
|
||||||
accessibilityTraits = .button
|
accessibilityTraits = .button
|
||||||
@ -259,8 +259,13 @@ open class SelectorBase<ModelType: SelectorModel>: Control<ModelType>, Changable
|
|||||||
toggleAndAction()
|
toggleAndAction()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@objc func tap() {
|
||||||
|
sendActions(for: .touchUpInside)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/// This will checkbox the state of the Checkbox and execute the actionBlock if provided.
|
/// This will checkbox the state of the Checkbox and execute the actionBlock if provided.
|
||||||
@objc open func toggleAndAction() {
|
open func toggleAndAction() {
|
||||||
//removed error
|
//removed error
|
||||||
if hasError && isSelected == false {
|
if hasError && isSelected == false {
|
||||||
hasError.toggle()
|
hasError.toggle()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user