add the touchUpInside since this is the only one using this
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
c2c88c7b90
commit
0decdb5a16
@ -402,17 +402,15 @@ open class ButtonIcon: Control, Changeable {
|
||||
centerXConstraint?.activate()
|
||||
centerYConstraint = icon.centerYAnchor.constraint(equalTo: iconLayoutGuide.centerYAnchor, constant: 0)
|
||||
centerYConstraint?.activate()
|
||||
}
|
||||
|
||||
/// Executed on initialization for this View.
|
||||
open override func initialSetup() {
|
||||
super.initialSetup()
|
||||
onClick = { control in
|
||||
guard control.isEnabled else { return }
|
||||
if control.selectedIconName != nil && control.selectable {
|
||||
control.toggle()
|
||||
}
|
||||
}
|
||||
|
||||
publisher(for: .touchUpInside)
|
||||
.sink(receiveValue: { [weak self] _ in
|
||||
guard let self, isEnabled,
|
||||
selectedIconName != nil,
|
||||
selectable else { return }
|
||||
toggle()
|
||||
})
|
||||
.store(in: &subscribers)
|
||||
}
|
||||
|
||||
/// This will change the state of the Selector and execute the actionBlock if provided.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user