self.button.rx.tap.asObservable().debounce(1, scheduler: MainScheduler.instance).subscribe(onNext: { [weak self] in
//Logic
})
debounce
tableView cell点击事件也可以
self.tableView.rx.itemSelected.asObservable().debounce(1, scheduler: MainScheduler.instance)
.map{ indexPath in
return (indexPath,self.dataSources![indexPath])
}
.subscribe(onNext: { [weak self] indexPath,model in
if let strongself = self{
strongself.selectCell(indexPath, model: model)
}
})
.disposed(by: self.disposeBag)