guofeifei1017 2016-09-06 07:22 采纳率: 0%
浏览 2946

iOS UIBezierPath生成的路线如何删除

iOS UIBezierPath生成的路线如何删除,生成线的代码如下:

self.path = [UIBezierPath bezierPath];
[self.path moveToPoint:from];
[self.path addLineToPoint:to];
self.pathLayer = [CAShapeLayer layer];
self.pathLayer.frame = containerView.bounds;
self.pathLayer.path = self.path.CGPath;
self.pathLayer.strokeColor = color.CGColor;
self.pathLayer.lineWidth = 2.0f;
self.pathLayer.lineJoin = kCALineJoinBevel;

NSMutableArray *ary = [NSMutableArray arrayWithArray:shapeLayers];
[ary addObject:self.pathLayer];
shapeLayers = [NSMutableArray arrayWithArray:ary];
[containerView.layer addSublayer:self.pathLayer];
  • 写回答

3条回答 默认 最新

  • 编天码地 2016-09-06 10:25
    关注

    删除线 具体是指什么 你如果不想用那个 路径 那把那个路径的层 删除就好了

    评论

报告相同问题?