         return tableView
     }()
     
-    var cellNodes: [RootNode] = [] {
-        didSet {
-            tableView.reloadData()
-        }
-    }
+    fileprivate var nodeModels: [(TweetModel, RootNode)] = []
+    private var referenceWidth: CGFloat = 0
     
     override func viewDidLoad() {
         super.viewDidLoad()

    }
    
    func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
        (cell as? TweetCell)?.rootNode = cellNodes[indexPath.row]
    }
    
    func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -> CGFloat {
        return 100
    }
    
    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
        
        return cellNodes[indexPath.row].frame.height
    }
}

class MyView: UIView {
    
    var color: UIColor? {
        set {
            backgroundColor = newValue
        }
        get {
            return backgroundColor
        }
    }
}

class TweetCell: UITableViewCell {
    
    override func layoutSubviews() {
        super.layoutSubviews()
        rootNode?.installInRootView(contentView)

            tweet: "Just discovered LayoutOps... silly name, great framework #yatusabes",
            thumbnail: #imageLiteral(resourceName: "thumb-nacho")
        )
        return (0..<500).map { _ in  [tweetFelix, tweetEloy, tweetJavi, tweetNacho] }.flatMap { $0 }
    }
    
}
