Last active
August 29, 2015 14:15
-
-
Save ericcgu/4f50d9bc33f239f0ae55 to your computer and use it in GitHub Desktop.
ParseUI Hack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!, object: PFObject!) -> JPUserTableViewCell! { | |
let cell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath) as JPUserTableViewCell | |
cell.imageView.hidden = true | |
(cell.viewWithTag(1) as PFImageView).image = kProfileDefaultProfileImage | |
dispatch_async(dispatch_get_main_queue(),{ | |
//cell.textLabel?.text = object["username"] as? String | |
if let profileImageData = object["profileImage"] as? PFFile { | |
println(profileImageData) | |
cell.imageView.file = profileImageData | |
(cell.viewWithTag(1) as PFImageView).file = cell.imageView.file | |
} | |
else { | |
(cell.viewWithTag(1) as PFImageView).image = kProfileDefaultProfileImage | |
} | |
}); | |
//cell.updateConstraints() | |
return cell | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment