UIView: how to do non-destructive drawing?

前端 未结 4 651
[愿得一人]
[愿得一人] 2020-12-08 08:03

My original question:

I\'m creating a simple drawing application and need to be able to draw over existing, previously drawn content in my d

4条回答
  •  被撕碎了的回忆
    2020-12-08 08:58

    This seems like a better method than I've been using. That is, in a touches event I make a copy of the view about to be updated. Then in drawRect I take that image and draw it to the view and make my other view changes at the same time.

    But this seems inefficient but the only way I figured out how to do it.

提交回复
热议问题