【发布时间】:2020-03-06 07:24:24
【问题描述】:
我想在我的 ViewModel 中将 UIButton 标题绑定到 BehaviorSubject<String>。我在Label 中进行操作,如下所示:
//ViewModel
var fullName = BehaviorSubject<String?>(value: "")
//ViewController
vm.fullName.bind(to: fullNameLabel.rx.text).disposed(by: bag)
有什么办法吗?
【问题讨论】: