美文网首页
切View圆角

切View圆角

作者: 守护地中海的花 | 来源:发表于2019-05-21 11:19 被阅读0次
  • 切view的上左 上右圆角
- (void)addBeziPath
{
    UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:self.bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(10, 0)];
    CAShapeLayer *maskLayer = [[CAShapeLayer alloc]init];
    maskLayer.frame = self.bounds;
    maskLayer.path = maskPath.CGPath;
    self.layer.mask = maskLayer;
}

相关文章

网友评论

      本文标题:切View圆角

      本文链接:https://www.haomeiwen.com/subject/rnpdzqtx.html