Eraser the drawing in iOS

后端 未结 1 1640
眼角桃花
眼角桃花 2021-01-26 02:27

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

         


        
相关标签:
1条回答
  • 2021-01-26 02:49

    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.

    0 讨论(0)
提交回复
热议问题