I need to make a collection view with a continuous loop of the contents. So, for instance, if the cell items have the integers 1 through 10, then when you hit 10, the next item in the list is 1, so that there is no stopping point.
I do not see an easy way to do that without subclassing and doing some custom offset manipulation. This is making me think iCarousel may be a better solution.
I also need to snap the cell to the center, making a sort of selection, and manipulate the appearance of that cell, which iCarousel seems to handle nicely.
My only problem is that is seems that using UICollectionView is a better approach, and I have read some (seemingly off-hand) comments about iCarousel being a poor approach.
Is there a way to do these things with a UICollectionView, or is iCarousel a good component/approach for solving these issues?
Cheers!
I assume you can do this the same way you can with a table view. You return a very large number for numberOfItemsInSection, and then in cellForItemAtIndexPath: you use the modulus operator to convert that number to a number between 0 and 9:
I’m not really sure how to do the “snap the cell to the center” thing, but there’s an example of that in the WWDC 2012 session 219 – Advanced Collection Views and Building Custom Layouts.