Guest User

Untitled

a guest
Mar 22nd, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. let cell = tableView.dequeueReusableCellWithIdentifier("TimeTypeCell", forIndexPath: indexPath) as! TimeTypeCell
  2.  
  3. let customField = customFields[indexPath.row]
  4.  
  5. cell.fieldNameLabel.text = customField["name"] as? String
  6. cell.fieldValueLabel.text = customField["total"] as? String
  7. cell.graphData = customField["totalGraph"] as! [Double]
  8.  
  9. cell.fieldGraph.dataSource = cell.self
  10. cell.fieldGraph.delegate = cell.self
  11.  
  12. cell.fieldGraph.reloadData() //This is where the redrawing happens
  13.  
  14. - (void)layoutSubviews {
  15. [super layoutSubviews];
  16. [self.contentView layoutSubviews]; // this does the trick
  17. }
Advertisement
Add Comment
Please, Sign In to add comment