Graphics Programs Reference
In-Depth Information
Build and run the application. Now your layer has an image for its contents, as shown in
Figure 22.5 .
Figure 22.5 Layer with image
Because layers exist in a hierarchy, they can have sublayers, and each layer has a pointer
back to its parent layer called superlayer . When a layer is composited to the screen, it
is copied to the screen, and then each sublayer is composited atop it. Therefore, a layer al-
ways draws on top of its superlayer .
In a view hierarchy, sibling views (views with the same parent) typically do not have
overlapping bounds. For instance, imagine a view with two subviews that are buttons.
What would be the point of them overlapping and obscuring each other? It would confuse
and frustrate the user trying to tap one or the other.
 
Search WWH ::




Custom Search