iPhone CALayer Stacking Order
Posted
by Brian
on Stack Overflow
See other posts from Stack Overflow
or by Brian
Published on 2010-03-31T14:17:34Z
Indexed on
2010/03/31
15:13 UTC
Read the original article
Hit count: 312
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.
© Stack Overflow or respective owner