I have an array of IDs ["one", "two", "three"...]
These Ids are matched against a json I get from a URLSession and then displayed in a collectionview.
At the moment it's just one simple collectionView with the feature to reorder it by long press and drag.
But I need the possibilty to split it up in sections.
The best thing would be to make the sections dynamic, so that I can add as many sections as I want and then sort the cells into the sections. I get what I could do if I had an array for every section like
section1 = ["one", "two"]
section2 = ["three", "four"]
But I have no Idea how to realize this in my current setup.
myArray = [["one", "two", "three", "four"]](one section). At some pointmyArray = [["one", "two"], [ "three", "four"]]. You retrievecellForRowAt:myObject = myArray[indexPath.section][indexPath.row]. numberOfSection:myArray.count. numberOfItemsInSections:myArray[section].count, in pseudo code.