我在 touchesMoved() 方法中编写了一个用于在 iOS 中绘图的程序。
CGContextAddPath(UIGraphicsGetCurrentContext(), path);
CGPathMoveToPoint(path, NULL, lastPoint.x, lastPoint.y);
CGPathAddLineToPoint(path, NULL, lastPoint.x, lastPoint.y);
CGContextDrawPath(UIGraphicsGetCurrentContext(), kCGPathStroke);
如何清除绘制的路径并恢复原始视图?