CAGradientLayers are pretty good. I almost always prefer drawing gradients using CGGradient, or using CAGradientLayer, using images, especially because you donβt need to turn on the retina / non-retina grid, iPhone / iPad combinations and change colors become a matter of setting one line of code rather than regenerating the whole series images in your image processing software.
If you are doing another drawing in drawRect, draw with CGGradient. If you only need a background, use the CAGradientLayer.
You can analyze performance using tools (product -> profile in Xcode)
- main animation tool will give you frames per second if there is scrolling / animation
- a time profiling tool will show you which features take up your time.
- various memory tools will show you memory consumption
source share