rxswift-self.usernameTF.rx.text.orEmpty.map

self.usernameTF.rx.text.orEmpty.map

一堆类型转化+数据处理的操作

self.usernameTF.rx:将textfiled用Reactive封装;

.text:监听和绑定text filed的值;

.orEmpty对上面的操作进行抽离简化二次封装;

.map使用ObservableType进行监听。

猜你喜欢

转载自www.cnblogs.com/feng9exe/p/9223599.html
今日推荐