Collection Views

Hi again, i have a doubt about how Collection Views work,
now i’m making an app that makes the model part of MVC in C++, and it’s going to generate a lot of images (always a random number) let’s say between 300 images that i want to display in a collection view, but i don’t want to generate them all at the same time because of the storage, i want that the collection view calls the image in the collection view that is going to be shown each time.

my question is, if i work with a collection views and i generate a lot of images does it loads all of them or just the ones he is showing?

UICollectionView (and UITableView too) only constructs the visible items, or maybe a few more than are visible. But not all of the items. As items are scrolled out of view they are reused for new items scrolling into view.

1 Like