标签:利用贝塞尔曲线
  UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:view2.bounds byRoundingCorners:UIRectCornerBottomRight | UIRectCornerTopRight cornerRadii:CGSizeMake(40, 40)];
    // 这里 40 40 表示圆弧的角度  前面的参数有四个类型  左上角  左下角  右上角  右下角  
    CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
   
    maskLayer.frame = view2.bounds;
    
    maskLayer.path = maskPath.CGPath;
    
    view2.layer.mask = maskLayer;
本文出自 “ZhuoKing” 博客,转载请与作者联系!
标签:利用贝塞尔曲线
原文地址:http://9951038.blog.51cto.com/9941038/1852327