Graphics Reference
In-Depth Information
Figure 2.11 The Interface Builder Inspector controls for contentsCenter
Custom Drawing
Setting the layer contents with a CGImage is not the only way to populate the backing
image. It is also possible to draw directly into the backing image using Core Graphics. The
-drawRect: method can be implemented in a UIView subclass to implement custom
drawing.
The -drawRect: method has no default implementation because a UIView does not
require a custom backing image if it is just filled with a solid color or if the underlying
layer's contents property contains an existing image instance. If UIView detects that
 
Search WWH ::




Custom Search