This question shows research effort; it is useful and clear
0
This question does not show any research effort; it is unclear or not useful
Bookmark this question.
Show activity on this post.
自从使用 pod 'RxSwift', '~> 3.0'和'RxCocoa', '~> 3.0'升级到 Swift 3 后,似乎distinctUntilChanged()不再可用于UITextField。我想如下使用它。我是否需要为UITextField编写和扩展,或者自 Swift 2 更新以来我错过了什么?
textField.rx.text.distinctUntilChanged().subscribe(onNext: {text in print("\(text)")}