The default value of this property is nil, which causes the layer to use a standard shadow shape. If you specify a value for this property, the layer creates its shadow using the specified path instead of the layer’s composited alpha channel. The path you provide defines the outline of the shadow. It is filled using the non-zero winding rule and the current shadow color, opacity, and blur radius.
Unlike most animatable properties, this property (as with all CGPathRef animatable properties) does not support implicit animation. However, the path object may be animated using any of the concrete subclasses of CAPropertyAnimation. Paths will interpolate as a linear blend of the "on-line" points; "off-line" points may be interpolated non-linearly (to preserve continuity of the curve's derivative). If the two paths have a different number of control points or segments, the results are undefined. If the path extends outside the layer bounds it will not automatically be clipped to the layer, only if the normal layer masking rules cause that.
Specifying an explicit path usually improves rendering performance.
The value of this property is retained using the Core Foundation retain/release semantics. This behavior occurs despite the fact that the property declaration appears to use the default assign semantics for object retention.
Using Shadow Path for Special Effects
You can use a layer's shadow path to create special effects such as simulating the shadows available in Pages.
Listing 1 shows the code required to add an elliptical shadow to the bottom of a layer to simulate the Pages Contact Shadow effect.
Listing 2 shows how to create a path to simulate the Pages Curved Shadow. The left, top and right sides of the path are straight lines, and the bottom is a concave curve as illustrated in Figure 2.
A Boolean indicating whether the layer is allowed to composite itself as a group separate from its parent.
This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.