iPhone CALayer Stacking Order
- by Brian
I'm using CALayers to draw to a UITableViewCell. I'm trying to figure out how layers are ordered with the content of the UITableViewCell. For instance:
I add labels to the UITableViewCell in my cellForRow:atIndexPath method
In the drawRect method of UITableViewCell I draw some content using the current context
Also, in drawRect I add a few sublayers
So what would be the order of these elements. I know I have zPosition on the CALayers but I'm not sure if they are always on top of any subviews of the UITableViewCell. And I'm not sure where the content that is drawn in drawRect comes in the order. Any help or links to documentation would be great. I have read through the Core Animation Programming Guide and didn't see anywhere where this would be answered.