iOS只给矩形两个边加圆角

- (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; }

iOS只给矩形两个边加圆角

上一篇:express+mongodb+mongoose简单入门


下一篇:Java的精确整数计算-Bigdecimal学习总结和工具类