开发者

UITableViewCell with 'ball' like calendar App

开发者 https://www.devze.com 2022-12-29 14:49 出处:网络
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.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号