title: How to call a function after a loop has ended?
body: <p>Currently we have part of a function where after JSON data has be collected and assigned to a data object. We then loop through the data object's image data value to update the imageviews. After the loop is finished we reload the tableview.  The problem that is occurring is the tableview is reloading after EVERY single object is updated creating flashing and other visual miscues.  If the tableview can load after ALL the image data has been updated it would be better.  Here is that portion of the code:</p>
  
  <pre><code>  if let extraImages = self.profileData?.images{
  
      let extraMovieImages = extraImages.images
      for image in extraMovieImages {
        self.updateImage(ImageType: DownloadPic.personal, ImageString: image.filePath, completion: {_ in
  
          DispatchQueue.main.async {
            self.TableView.reloadData()
          }
        })
      }
    }
  </code></pre>