Closed delebedev closed 8 years ago
Hi @garnett ,
I've updated example app in RxDataSources.
Take a look at CustomizationUsingTableViewDelegate
.
You can just use rx_setDelegate
to set table view delegate to your VC or some other data source where you have your lambda.
You can always inherit one of data sources and make it implement UITableViewDelegate methods and add your own closures that implement those methods. There is no reason why data source couldn't also implement delegate methods since you can observe notifications using RxCocoa extensions.
@kzaher that's exactly what I was looking for, thanks!
Hello,@garnett and @kzaher . I also have the same question about how to get different height for every tableViewCell. I have read about CustomizationUsingTableViewDelegate example. But I only known I need to use setDelegate to set table view delegate to my VC ,and then I can use the delegate methods to get the height:
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 50
}
but how can I get different height? If I need to get a model in here,and calculate the height of the content? Or, there are some other good ways? Please let me known, Thanks.
I'm playing with ReactiveDataSource and data-part looks very good, however I have different height (depends on model) for every cell. What is the most idiomatic way to reactify
heightForRowAtIndexPath
if it is possible at all?Currently I'm caching returned models in viewController using
doOn
for side effects