I'm new to swift and not sure why an image is loading from the url. The code:
let url = NSURL(string: imageURL)
let task = NSURLSession.sharedSession().dataTaskWithURL(url!, completionHandler: { (data, response, error) -> Void in
println("Should load the pic!")
var profilePic = UIImage(data: data)
self.profileImage.setImage(profilePic)
})
In my interface controller I have an image called "profileImage" that is linked with an IBOutlet. One thing I noticed is that "Should load the pic!" does not appear in the console so it is not getting to the setImage code..