给cell画圆角
//给组cell上方设置圆角
- (void)createTopCornerRadius:(UITableViewCell*)cuCell{UIBezierPath*maskPath = [UIBezierPath bezierPathWithRoundedRect:cuCell.contentView.bounds byRoundingCorners:UIRectCornerTopLeft|UIRectCornerTopRight cornerRadii:CGSizeMake(10,10)];CAShapeLayer*maskLayer = [[CAShapeLayer alloc]init];maskLayer.frame= cuCell.contentView.bounds;maskLayer.path= maskPath.CGPath;cuCell.layer.mask= maskLayer;}
//给组cell下方设置圆角
- (void)createBottomCornerRadius:(UITableViewCell*)cuCell{UIBezierPath*maskPath = [UIBezierPath bezierPathWithRoundedRect:cuCell.contentView.bounds byRoundingCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight cornerRadii:CGSizeMake(10,10)];CAShapeLayer*maskLayer = [[CAShapeLayer alloc]init];maskLayer.frame= cuCell.contentView.bounds;maskLayer.path= maskPath.CGPath;cuCell.layer.mask= maskLayer;}
本文标题:给cell画圆角
本文链接:https://www.haomeiwen.com/subject/ybccjctx.html
网友评论