Collection view controller infinite

How can I make collection view controller with infinite scroll?

Check out UITableView Infinite Scrolling Tutorial.

It is not about collection views, but should give you enough info to get started.

Have fun!

I talk about loop scrolling. I should see first item after last item.

Hi @alexsandr, to enable loop scrolling you have to do a little math when you deque the cells. So your numberOfRows will be maximum (infinite) and in the cellForRow… you need to get the appropriate cell data by getting the modulus from the current_row_index and maximum_items, this remainder will give you the row you need. However be careful that if your maximum_items are less than a screenfull, then you will have duplicates.



This topic was automatically closed after 166 days. New replies are no longer allowed.