title: Async load image on swift / ios?
body: <p>here is my situation, ( please be aware i'm starting on iOS dev :) ).</p>
  
  <p>I have a list of feed where the data are beign fetch from firebase, each feed get an image and title in a table view.</p>
  
  <p>I'm looking for a way, that if the user come back to the app without any internet connection, to still display those data, whic have been display before that.</p>
  
  <p>Currently, I'm using this to display the data:</p>
  
  <pre><code>import UIKit
  import FirebaseAuth
  import FirebaseDatabase
  import FirebaseStorage
  import SwiftKeychainWrapper
  import SwiftyJSON
  
  var posts = [Post]()
  var selectedIndexPath: Int = 10
  
  class FeedVC: UIViewController, UITableViewDataSource, UIImagePickerControllerDelegate, UINavigationControllerDelegate, UITableViewDelegate {
  
  @IBOutlet weak var feedTableView: UITableView!
  
  private var readPosts: ObserveTask?
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      feedTableView.dataSource = self
      feedTableView.delegate = self
  
      readPosts = Post.observeList(from: Post.parentReference.queryOrdered(byChild: "privacy").queryEqual(toValue: false))
  
      {
          observedPosts in
  
          posts = observedPosts.reversed()
          self.feedTableView.reloadData()
      }
  }
  
  override var prefersStatusBarHidden: Bool {
      return true
  }
  
  func numberOfSections(in tableView: UITableView) -&gt; Int {
      return 1
  }
  
  func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
      return posts.count
  }
  
  func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -&gt; CGFloat {
      return UITableViewAutomaticDimension
  }
  
  func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -&gt; CGFloat {
      return UITableViewAutomaticDimension
  }
  
  
  func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell  {
      let cell = self.feedTableView.dequeueReusableCell(withIdentifier: "MessageCell")! as UITableViewCell
  
  
   let imageView = cell.viewWithTag(1) as! UIImageView
  
  
  
      let titleLabel = cell.viewWithTag(2) as! UILabel
      let linkLabel = cell.viewWithTag(3) as! UILabel
  
      titleLabel.text = posts[indexPath.row].title
      titleLabel.numberOfLines = 0
  
      linkLabel.text = posts[indexPath.row].link
      linkLabel.numberOfLines = 0
  
  
  
      Storage.getImage(with: posts[indexPath.row].imageUrl){
          postPic in
          imageView.image = postPic
      }
  
      return cell
  
  }
  
  
  func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
      guard posts[indexPath.row].title != "COMING SOON" else {
          return
      }
             selectedIndexPath = indexPath.row
            self.performSegue(withIdentifier: "push", sender: self)
              self.feedTableView.reloadData()    }
  
  
  }
  </code></pre>
  
  <p>How is this possible to do ? I've been looking from NSUR function, is this a good start ? </p>
  
  <p>Thanks a lot for your time !</p>