Tap gesture implementation for label rxswift
Problem:
I want to implement the tap gesture to the label using rxswift. How to implement?
Solution:
Code:
let tapGesture = UITapGestureRecognizer()
lbl.addGestureRecogni
lbl.isUserInteraction
tapGesture.rx.event
.subscribe(onNext: { [weak self] _ in
self?.myfunc()
})
.disposed(by: disposeBag)
Comments
Post a Comment