切某个位置圆角
//切圆角
CAShapeLayer *shapeLayer = [CAShapeLayer layer];
shapeLayer.path = [UIBezierPath bezierPathWithRoundedRect:backgroundImage.frame byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(5, 5)].CGPath;
backgroundImage.layer.mask = shapeLayer;
[self addSubview:backgroundImage];
网友评论