title: Best practices for downloading images in a UITableView's cells? iOS/Swift
body: <p>So I had this argument at work about what's better for downloading images in a UITableView's cells.</p>
  
  <p>The two options are:
  In the cellForRowAtIndex, I download the image asynchronously which leads to using multiple threads and multiple network requests which we suspect may be the issue for battery drain.</p>
  
  <p>The other option is to download all the images at once using one thread and one network request, by looping through an array with all the images' URLs outside the cellForRowAtIndex of coarse, and then calling the the table view reload function.</p>
  
  <p>There is also a slight modification for latter approach where we can set each image (perhaps by calling the reload function) as soon as each image is downloaded.</p>
  
  <p>So I would love to know, what's the industry standard way of handling this? What are the pros and cons especially when it comes to performance? Are there any better ways?</p>