|
Post by wyntersoft on Oct 4, 2023 7:13:06 GMT
First off great product! Was able to convert a project from using UnlimitedScrollUI to this in about 2 hours.
Most of that though was in trying to get good behavior around the scrolling and I wound up basically pasting the Chat demo into the app. However, it doesn't make much sense doing it like that and really violated the MVC style the asset is going for. Why should the model hold view specific data? (The height of the cell.) If there's multiple views into that data then you'd need a different solution. Why should by view which is a delegate of the scroller start issuing commands to the scroller?
It'd be really nice if the behavior that is in that demo was an option of the base functionality of the scroller, rather than the user needing to implement it for each usage.
Thanks again for the product though! Was really really easy to drop into an existing project!
|
|
|
Post by echo17 on Oct 4, 2023 13:51:51 GMT
Thanks for the kind words.
The EnhancedScroller calculates the cell layouts separately from the actual creation of cell objects, so it needs to know cell sizes from the Controller. You don’t need to store them in the view model, you could keep a separate list of data just for the cell sizes, passing them to the scroller when it requests the cell size. You are correct that this violates the MVC rules, but I use that design pattern more as a guide than a rigid system.
I’ll definitely consider your suggestions for future improvement.
|
|