我只是想用笔划绘制圆圈,下面的代码画得很好,但它填满了圆圈。
我不希望它被填满。请帮帮我
self.circleView = [[UIView alloc] initWithFrame:CGRectMake(10,20,20,20)];
circleView.alpha = 0.5;
self.circleView.layer.cornerRadius = 50;
self.circleView.backgroundColor = [UIColor whiteColor];
答案 0 :(得分:1)
更改
self.circleView.backgroundColor = [UIColor whiteColor];
到
self.circleView.backgroundColor = [UIColor clearColor];
并为边框(Stroke)添加
self.circleView.layer.borderColor = [[UIColor redColor] CGColor];
self.circleView.layer.borderWidth = 1;