iPhone's user interface makes intensive use of gradients and shading for achieving a good looking user experience. For example, a glossy effect can be created by applying gradients of different colors. Through colors and gradients we can get a closer interface to how native applications look and feel.
A gradient can be applied to a figure as either linear or radial to our shapes and figures, the difference being the direction in which the gradient is applied. Linear gradients need a starting and ending point. On the other hand, radial gradients need to define applied circle to be. From the geometric point of view, linear gradients are applied through a simple vector and radial gradients are defined using a two-dimensional array of vectors.
The required HTML files for this recipe can be reached at: code/ch04/gradients/
in the code bundle provided on the Packtpub site.