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:
Matt Bruce 2024-08-09 13:19:33 -05:00
parent c2c88c7b90
commit 0decdb5a16

View File

@ -402,17 +402,15 @@ open class ButtonIcon: Control, Changeable {
centerXConstraint?.activate() centerXConstraint?.activate()
centerYConstraint = icon.centerYAnchor.constraint(equalTo: iconLayoutGuide.centerYAnchor, constant: 0) centerYConstraint = icon.centerYAnchor.constraint(equalTo: iconLayoutGuide.centerYAnchor, constant: 0)
centerYConstraint?.activate() centerYConstraint?.activate()
}
/// Executed on initialization for this View. publisher(for: .touchUpInside)
open override func initialSetup() { .sink(receiveValue: { [weak self] _ in
super.initialSetup() guard let self, isEnabled,
onClick = { control in selectedIconName != nil,
guard control.isEnabled else { return } selectable else { return }
if control.selectedIconName != nil && control.selectable { toggle()
control.toggle() })
} .store(in: &subscribers)
}
} }
/// This will change the state of the Selector and execute the actionBlock if provided. /// This will change the state of the Selector and execute the actionBlock if provided.