override func viewDidLoad() { super.viewDidLoad() var url = NSURL(string: "http://example.png") var request = NSURLRequest(URL: url) NSURLConnection.sendAsynchronousRequest(request, queue: NSOperationQueue.mainQueue()) { (response:NSURLResponse!, data: NSData!, error: NSError!) -> Void in ! self.sampleImage = UIImage(data: data) } } } ɾॳظ͕ܾ·ͬͯͳ͍߹ͰɺॳظԽ͞Εͳ͍͔͠Εͳ͍ͱ͖
ɹ0QUJPOBMͰએݴ͢Δ