How to remove CAShapeLayer along user drag?

自古美人都是妖i 提交于 2019-12-12 05:44:52

问题


I am new to painting app ,so please suggest me is there any way to remove.

i was googled i am only getting

  CGContextSetBlendMode(_context, kCGBlendModeClear);

but not for CAShape layer

UIBezierPath *path = [UIBezierPath bezierPath];
    [path moveToPoint:CGPointMake(touchPoint.x,touchPoint.y)];
    [path addLineToPoint:CGPointMake(startingPoint.x,startingPoint.y)];

    CAShapeLayer *shapeLayer = [CAShapeLayer layer];

    shapeLayer.path = [path CGPath];
//    shapeLayer.strokeColor =kCGBlendModeClear;

    if([UIDevice currentDevice].userInterfaceIdiom ==UIUserInterfaceIdiomPad)
    {
        shapeLayer.lineWidth = 7.0;

    }
    else
    {
        shapeLayer.lineWidth = 5.0;

    }
    shapeLayer.fillColor = [[UIColor clearColor] CGColor];
    [self.layer addSublayer:shapeLayer];
    [clearBeizer addObject:shapeLayer];

please help me to remove that layer thanks.

来源:https://stackoverflow.com/questions/35053624/how-to-remove-cashapelayer-along-user-drag

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!