iOS绘制指定位置圆角
2020-06-23 本文已影响0人
Qy_iOS
//绘制圆角 要设置的圆角 使用“|”来组合
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:cell.groundView.bounds byRoundingCorners:UIRectCornerBottomLeft | UIRectCornerBottomRight cornerRadii:CGSizeMake(7, 7)];
CAShapeLayer*maskLayer = [[CAShapeLayeralloc]init];
//设置大小
maskLayer.frame= cell.groundView.bounds;
//设置图形样子
maskLayer.path= maskPath.CGPath;
cell.groundView.layer.mask= maskLayer;