- (void)updataTopCornerRadius {
CGRect clipRect = CGRectMake(, , self.headPhotoIv.width, self.headPhotoIv.width);
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:clipRect byRoundingCorners:UIRectCornerTopLeft|UIRectCornerTopRight cornerRadii:CGSizeMake(, )];
CAShapeLayer *maskLayer = [CAShapeLayer layer];
maskLayer.frame = clipRect;
maskLayer.path = maskPath.CGPath;
self.headPhotoIv.layer.mask = maskLayer; }
相关文章
- 01-08iOS只给矩形两个边加圆角