开发者

Draw circle and store in UIImage

开发者 https://www.devze.com 2023-02-08 14:11 出处:网络
How do I draw a filled circle with core graphics and return it as a UIImage? I want to do something like the following:

How do I draw a filled circle with core graphics and return it as a UIImage?

I want to do something like the following:

+ (UIImage*) circleImageWithRadius:(CGFloat)radius fillColor:开发者_开发知识库(UIColor*)clr;


This should get you most of the way there: http://www.codza.com/creating-and-drawing-on-a-new-uiimage

Also look at CGContextFillEllipseInRect: http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Reference/CGContext/Reference/reference.html

0

精彩评论

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

关注公众号