Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TabelView Delegate methods using RxSwift

I am using RxSwift for TableView.I need to calculate height of dynamic cells previously I did it in WillDisplayCell delegate method. I don't know how to bind TableView Delegate methods with RxSwift. Can any one help?

like image 740
Mehreen Avatar asked Mar 30 '17 11:03

Mehreen


1 Answers

Actually you can. Try this:

       tableView.rx
        .willDisplayCell
        .subscribe(onNext: { cell, indexPath in
   //Do your will display logic
           })
        .disposed(by: disposeBag)
like image 112
Aaqib Hussain Avatar answered Oct 12 '22 22:10

Aaqib Hussain