When I set like this:
a lot of cell will be created...But need the collectionView to be wide like this..So I can't let collectonView 's width is as wide as controller's view 's width. So I set it to 3000 (maybe more wide actually..).In this case,a lot of cell will be created and if width is larger than contentSize.width ..the cell's recycle system will be useless...
So ,How can i let collectionView wide like this can just create the cell's I can see?
Code Block swift collectionView.frame = .init(x: 0, y: 0, width: 3000, height: 100)
a lot of cell will be created...But need the collectionView to be wide like this..So I can't let collectonView 's width is as wide as controller's view 's width. So I set it to 3000 (maybe more wide actually..).In this case,a lot of cell will be created and if width is larger than contentSize.width ..the cell's recycle system will be useless...
So ,How can i let collectionView wide like this can just create the cell's I can see?