Hello. Noob here for Rx. I really cant find example on show to subscribe to uilabel's text change.
Anyone can show me an example on how to do it?
Thanks
UILabel.rx.text is Observer not Observable, it cannot be subscribed.
@linqingmo Yes, I noticed that too. So any other way?
UILabel dose not have delegate. Can use KVO.
label.rx.observe(String.self, "text")
.subscribe(onNext: { text in
print(text)
})
.disposed(by: disposeBag)
Hi,
this doesn't look like an issue with the project itself but more of a "how do I do XXX" question.
Please ask these kinds of questions in our slack channel http://rxswift-slack.herokuapp.com/ or some other more appropriate communication channel.
We are asking this because:
we can't scale development of this project if people are reporting false issues and we are spending lot of time answering those directly instead of working on this project.
all who are interested in development of this project and watching it are being spammed by irrelevant information.
those who want to know what are currently unresolved serious issues are having a harder time figuring it out because list is spammed by non issues, so the real issues are masked.
Thank you for understanding.
Regardless of that, there is no problem doing label.rx.subscribe(onNext: { text in ... , Please make sure you imported RxCocoa.
I don't know why can't find this API label.rx.subscribe(onNext: { text in ... @freak4pc
Most helpful comment
UILabel dose not have delegate. Can use KVO.