Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2015
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. override func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!, object: PFObject!) -> PFTableViewCell! {
  2.  
  3. let cell = tableView.dequeueReusableCellWithIdentifier(Constants.CellReuseIdentifier, forIndexPath: indexPath) as? BurnFeedTableViewCell ??
  4. BurnFeedTableViewCell(style: UITableViewCellStyle.Default, reuseIdentifier: Constants.CellReuseIdentifier)
  5.  
  6. cell.nameOfBurnLabel?.text = object.objectForKey("name") as? String
  7. if let owner = object.objectForKey("owner") as? PFUser {
  8. cell.ownerLabel?.text = owner.username
  9. } else {
  10. cell.ownerLabel?.text = "unknown"
  11. }
  12.  
  13. return cell
  14. }
  15.  
  16. override func viewDidLoad() {
  17. super.viewDidLoad()
  18.  
  19. self.tableView.estimatedRowHeight = 100.0
  20. self.tableView.rowHeight = UITableViewAutomaticDimension
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement