lundi 6 août 2018

For MVVM design pattern, where does table view cell height belong to?

I have a view model that contains my model and other properties used by my table view delegate methods in my view controller. For heightForRowAt delegate method, I’m passing a computed property from my viewmodel to dynamically calculate the height of the row. My question is does row height property belong to my viewmodel? What if it’s just a constant instead of computed property? If not, why? Should I put it inside another struct instead?

Aucun commentaire:

Enregistrer un commentaire