美文网首页
自定义圆角

自定义圆角

作者: 执着的小蛋挞 | 来源:发表于2016-03-15 18:37 被阅读37次

UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:apply.bounds byRoundingCorners:UIRectCornerTopRight | UIRectCornerBottomRight cornerRadii:CGSizeMake(5, 5)];

CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];

maskLayer.frame = apply.bounds;

maskLayer.path = maskPath.CGPath;

apply.layer.mask = maskLayer;      自定义圆角

相关文章

网友评论

      本文标题:自定义圆角

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