Open Smiller193 opened 4 years ago
@weyert @iperry90
okay I actually figured this out.
For anyone that cares to know all I did was create one nested adapter for each collectionViewCell that had a UICollectionView nested in it. Following that I assigned the nested collectionView to the collectionView handled by the appropriate adapter.
After that I basically just did a switch on the viewModel and assigned the appropriate data and section controller based off the viewModels that I want to be nested.
New issue checklist
README
and documentationGeneral information
IGListKit
version:So this isn't really so much an issue and more of a how to. Thanks to this guide https://instagram.github.io/IGListKit/modeling-and-binding.html I was able to take my Event object and render it using a ListBindingSectionController with the accompanying view models attached to the accompanying cells. Here is what my object looks like:
As you can see there are certain properties that are arrays such as eventImages,attendingUsers,eventTags, etc. This means that I would need to implement multiple nested collectionViews/ list adapters inside the context of this EventDetailViewController. I was able to follow the code in the NestedAdapterViewController example in addition to this issue (https://github.com/Instagram/IGListKit/issues/1209) to achieve this task for eventImages but how would I do that for the rest of the nested collectionviews/adapters that will be present on this detail screen.
I mean I know it wouldn't be feasible to try to create multiple adapters so im really not sure where to start when it comes to creating more of these nested collectionViews and not completely screw something up.
Im thinking of doing some type of switch statement on the viewModel but im not entirely sure how that would work. Does anyone have any example code or is anyone able to point me in the right direction. If more of the code is needed to answer me properly lmk but most of my code looks similar to the mentioned examples.