Unlike a data source object which provides data on-demand, the UICollectionView Layout is a delegate that layout the whole collection view once. (calling sizeForItemAtIndexPath for all items).
My question is, if I have a collection view of 100 items, each item consists a image from a URL, and I want to display the images with their aspect ratio. When should I make URL request and get the images ?
Note: In order for the layout to work, I have to make 100 URL requests to get all the images, and figure out their sizes; but the UI only needs to show a few at a time (cellForItemAtIndexPath)
Note: Could the UICollectionView asks for the sizeForItem On Demand (like a data source) ?
Note: UITableView has an "estimatedHeight" and "Height", why and when will Collection View has them ?