UIView *view=[cell viewWithTag:1000];
UIBezierPath *maskPath=[UIBezierPath bezierPathWithRoundedRect:view.bounds byRoundingCorners:(UIRectCornerTopLeft | UIRectCornerBottomLeft) cornerRadii:CGSizeMake(5.0, 5.0)];
CAShapeLayer *maskLayer=[[CAShapeLayer alloc] init];
maskLayer.frame=view.bounds;
maskLayer.path=maskPath.CGPath;
view.layer.mask=maskLayer;
本文介绍了一种使用iOS和Swift实现特定视图圆角效果的方法。通过UIBezierPath和CAShapeLayer创建左上角和左下角为圆角的UIView,并应用到UITableViewCell中。
4399

被折叠的 条评论
为什么被折叠?



