can't draw fast enough to keep up with touchesMoved?

后端 未结 2 561
臣服心动
臣服心动 2021-02-09 19:18

I am trying to implement simple paint functionality in my iPhone app. I tried updating a bitmap with a bitmap brush, and I also tried this tutorial.

Both methods have

2条回答
  •  余生分开走
    2021-02-09 19:49

    You can't directly call drawRect:. To refresh your screen on demand, try calling [self setNeedsDisplay] from your touchesMoved method, which will setup the proper contexts for a call to drawRect:.

提交回复
热议问题