title: sendAsynchronousRequest deprecated in iOS 9
body: <p>I'm trying to change my code from Swift 1.2 to Swift 2.0 but I'm having some problems regarding the "sendAsynchronousRequest" because it's always showing a warning because it's deprecated. I have tried using another solution from this post: <a href="https://stackoverflow.com/questions/30774623/cannot-invoke-sendasynchronousrequest-in-swift-2-with-an-argument-list">Cannot invoke &#39;sendAsynchronousRequest&#39; in Swift 2 with an argument list</a> but it's still not working and I'm having the same warning again.</p>
  
  <p>What I have to change in my code to solve this warning? The warning is the following: </p>
  
  <p><em>sendAsynchronousRequest was deprecated in iOS 9, use dataTaskWithRequest:completionHandler</em></p>
  
  <p><strong>This is my code:</strong></p>
  
  <pre><code>func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -&gt; UICollectionViewCell {
  
      // try to reuse cell
      let cell = collectionView.dequeueReusableCellWithReuseIdentifier(reuseIdentifier, forIndexPath: indexPath) as! MarcaCollectionViewCell
  
      // get the deal image
      let currentImage = marcas[indexPath.row].imagen
      let unwrappedImage = currentImage
      var image = self.imageCache[unwrappedImage]
      let imageUrl = NSURL(string: marcas[indexPath.row].imagen)
  
      // reset reused cell image to placeholder
      cell.marcaImageView.image = UIImage(named: "")
  
      // async image
      if image == nil {
  
          let request: NSURLRequest = NSURLRequest(URL: imageUrl!)
          NSURLConnection.sendAsynchronousRequest(request, queue: NSOperationQueue.mainQueue(), completionHandler: {(response: NSURLResponse?,data: NSData?,error: NSError?) -&gt; Void in
              if error == nil {
  
                  image = UIImage(data: data!)
  
                  self.imageCache[unwrappedImage] = image
                  dispatch_async(dispatch_get_main_queue(), {
                      cell.marcaImageView.image = image
  
                  })
              }
              else {
  
              }
          })
      }
  
      else {
          cell.marcaImageView.image = image
      }
  
      return cell
  
  }
  </code></pre>