Better shadow performance on views

There are two different uses for the shadowPath property on CALayer:

  1. Improving the performance of having a shadow
  2. 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.

Continue reading “Better shadow performance on views”