使用rx.controlEvent(.editingChanged)过程中,输入中文, action一直调2次,一定要记得判断textField.markedTextRange == nil
searchTextField.rx.controlEvent(.editingChanged)
.subscribeOn(MainScheduler.instance)
.subscribe(onNext: { [weak self] _ in
self?.action()
})
.disposed(by: bag)
func action() { }
网友评论