Guest User

Untitled

a guest
Jul 24th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. let url: NSURL = NSURL(string: "http://hogehoge.com/1.jpg")!
  2. let req = NSURLRequest(URL:url)
  3. NSURLConnection.sendAsynchronousRequest(req, queue:NSOperationQueue.mainQueue()){(res, data, err) in
  4. let img = UIImage(data:data!)
  5. cell!.thumb.image = img
  6. }
  7.  
  8. let url2: NSURL = NSURL(string: "http://hogehoge.com/2.jpg")!
  9. let req2 = NSURLRequest(URL:url2)
  10. NSURLConnection.sendAsynchronousRequest(req2, queue:NSOperationQueue.mainQueue()){(res2, data2, err2) in
  11. let img2 = UIImage(data:data2!)
  12. cell!.thumb2.image = img2
  13. }
  14.  
  15. let url3: NSURL = NSURL(string: "http://hogehoge.com/3.jpg")!
  16. let req3 = NSURLRequest(URL:url3)
  17. NSURLConnection.sendAsynchronousRequest(req3, queue:NSOperationQueue.mainQueue()){(res3, data3, err3) in
  18. let img3 = UIImage(data:data3!)
  19. cell!.thumb3.image = img3
  20. }
Add Comment
Please, Sign In to add comment