Using iOS6’s awesome new UICollectionView how am I able to delete all of the UICollectionViewCell objects in a big loop?
Say I’ve loaded all my data into it already, I hit refresh, I want to delete everything currently in there, then just call my stuff again.
I’ve found deleteItemsAtIndexPaths which takes an NSArray, so how can I get all items into it?
Turns out I can use
deleteSectionsand pass aNSIndexSetthrough to it, making a range of0,0and it’ll delete the one and only section.I could probably just use
indexSetWithIndexbut when I did my app crashed.