iOS 在一个控件上切一个透明的圆

前端之家收集整理的这篇文章主要介绍了iOS 在一个控件上切一个透明的圆前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

<table class="ruby"><tr class="li1">
<td class="ln"><pre class="de1">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

voidaddShadowView     . = @NSValue valueWithCGPoint:CGPointMake,,NSValue valueWithCGPoint:CGPointMake,;       int radius = ;     UIBezierPath path = UIBezierPath bezierPathWithRoundedRect:CGRectMake,,...,... cornerRadius:;       NSValue point .         UIBezierPath circlePath = UIBezierPath bezierPathWithRoundedRect:CGRectMakepoint..,point..,radius,radius cornerRadius:radius;         path appendPath:circlePath;           path setUsesEvenOddFillRule:YES;       CAShapeLayer fillLayer = CAShapeLayer layer;     fillLayer. = path.;     fillLayer. = kCAFillRuleEvenOdd;     fillLayer. = UIColor blackColor.;     fillLayer. = ;     . addSublayer:fillLayer;                                                                                      refs: http:stackoverflow.a                                     原文链接:https://www.f2er.com/note/422017.html

猜你在找的程序笔记相关文章