I am working on a drawing app, I have a UIBezeirPath, with which I draw in touchesMoved, and convert it to CGPath and then draw on to CGlayer,
Here is my code
Did you paste in your code correctly? As it's shown, the -touchesMoved:withEvent method is closed out around line 14, just before the //Erase
statement. That would mean that your CGContextRef is now a class variable, and your for loop is never executed by anyone, and I don't think it would compile, hence I wonder if you are omitting some code.