UITableViewCell with 'ball' like calendar App
in the iPhone Calendar app, the view to select th开发者_运维百科e 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.
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
精彩评论