There are two different uses for the
shadowPath property on
- Improving the performance of having a shadow
- Creating shadows that don’t match the contents of the view. Check out Apple’s Using Shadow Path for Special Effects.
For performance reasons, always set a
shadowPath. This is a substantial improvement, especially if the view changes position via animation or presence in a scroll view.