I am creating an app like whiteboard application. I have one dynamic image. Image has multiple colors. I want to draw line on that Image same as whiteboard so I had overlap a Transparent View on that. Now I am drawing line with chosen color that's working very well.
Now the problem is when I try to erase the line when touch on screen it should show effects like eraser. If I has some fixed color (like white) background then for erasing line I can draw a line with background color but here I have transparent background of view so I cant do that.
I tried with draw a line with color has alpha = 0 but this doesn't reflect anything as the line is also transparent color.
I am adding in my draw rect method.
for (UIBezierPath *path in aryDrawPath) {
[[UIColor redColor] set];
[path stroke];
}
Can any body help me to solve this problem.
Thanks a lot
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…