其实就是两张图片,然后第一张图片被手指划过的地方clear掉再生成图片。赋值给上层的ImageView。
UIGraphicsBeginImageContext(self.topImageView.frame.size);
[self.topImageView.imagedrawInRect:self.topImageView.bounds];
CGContextClearRect(UIGraphicsGetCurrentContext(), CGRectMake(point.x-5, point.y-5, 10, 10));
self.topImageView.image=UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();