Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let cell = tableView.dequeueReusableCellWithIdentifier("TimeTypeCell", forIndexPath: indexPath) as! TimeTypeCell
- let customField = customFields[indexPath.row]
- cell.fieldNameLabel.text = customField["name"] as? String
- cell.fieldValueLabel.text = customField["total"] as? String
- cell.graphData = customField["totalGraph"] as! [Double]
- cell.fieldGraph.dataSource = cell.self
- cell.fieldGraph.delegate = cell.self
- cell.fieldGraph.reloadData() //This is where the redrawing happens
- - (void)layoutSubviews {
- [super layoutSubviews];
- [self.contentView layoutSubviews]; // this does the trick
- }
Advertisement
Add Comment
Please, Sign In to add comment