且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何绘制一个只是一个圆圈的自定义UIView - iPhone应用程序

更新时间:2023-11-04 09:48:40

您可以使用QuartzCore并执行此操作 -

You could use QuartzCore and do something this --

self.circleView = [[UIView alloc] initWithFrame:CGRectMake(10,20,100,100)];
self.circleView.alpha = 0.5;
self.circleView.layer.cornerRadius = 50;  // half the width/height
self.circleView.backgroundColor = [UIColor blueColor];