1

in the iPhone Calendar app, the view to select the calendar for a particular event has a coloured circle next to the calendar name, drawn with a graduated/3D effect of a ball.

Does anyone have any sample code for how this is drawn - I can draw a solid circle in the UITableViewCell, but I'm not sure how to get the 3D effect.

Thanks.

Stuart Tevendale
  • 614
  • 6
  • 19

1 Answers1

0

You might be able to do this with a CAGradientLayer using a radial gradient, see this answer.

Also, take a look at the documentation on Gradients.

alt text http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/Art/shaded_sphere.gif

Community
  • 1
  • 1
progrmr
  • 75,956
  • 16
  • 112
  • 147