//贝塞尔画圆
UIBezierPath * path= [UIBezierPath bezierPathWithRect:CGRectMake(0, 64, ScreenWidth, ScreenHeight)];
CAShapeLayer *layer = [CAShapeLayer layer];
if(clipType == // 圆形 // )
{
//绘制圆形裁剪区域
[path appendPath:[UIBezierPath bezierPathWithArcCenter:self.view.center radius:self.radius startAngle:0 endAngle:2* M_PI clockwise:NO]];
}
else
{
// 绘制方形剪裁区域
[path appendPath:[UIBezierPath bezierPathWithRect:CGRectMake(center.x - self.radius, center.y - self.radius, self.radius * 2, self.radius * 2)]];
}
[path setUsesEvenOddFillRule:YES];
layer.path = path.CGPath;
layer.fillRule = kCAFillRuleEvenOdd;
layer.fillColor = [[UIColor blackColor] CGColor];
layer.opacity = 0.5;
[_overView.layer addSublayer:layer];