How to load all UICollectionView cells at once?

I have UICollectionViewwith a lot of cells. I want to load all cells in viewDidLoad, but only UICollectionViewloads my cells when they are visible.

Any suggestions?

+4
source share
2 answers

To reformulate the problem, collection view cells contain images that load lazily, but you require them to be displayed immediately. The idea behind your question is to force a collection view to preload all cells. But you really do not want the cells, you want the images, so let's get the images.

, , , , ( , , ):

, imageNamed:, , , , .

. , .

, @CrimsonChris , . , , . (, , , ).

+1

viewDidLoad . cellForItemAtIndexPath:. . , , .

+1

Source: https://habr.com/ru/post/1545383/


All Articles