Can I add a tap publisher to a UIView or UILabel? UIButton has tapPublisher built in. I tried making an extension, but extensions can't store properties.
Also, is it bad practices to try and use a tap publisher on anything that isn't a button?
func bindViewModel() {
cancellables = [
continueButton.tapPublisher.sink { [unowned self] in
viewModel.action
.send(.question)
},
headlineLabel.tapPublisher.sink {
// Error: "Value of type 'UILabel' has no member 'tapPublisher'..."
})
]
}