I'm generating and displaying a tree structure on a UIView in an iPad app. let's call the view ROOTVIEW. All the tree nodes are UIViews too, which has label and UIImage as subviews. When a node is generated from the data source, it will generate a UIView for the node and add to ROOTVIEW as subview. But the problem is, when the tree structure is large, like thousands of nodes, it will use way too much memory.
Because the node's view won't change after added to ROOTVIEW, I come up with a solution: when we get the node's UIView, instead of adding it to ROOTVIEW as subview, we draw it on the ROOTVIEW, and release the node's UIView. so at the end there will be only one view: ROOTVIEW.
I'm not quite familiar with Quartz, how can I draw a subview onto UIView? thanks.