I\'m writing an application that uses your finger to draw simple diagrams. I have it working for the most part but now I\'m trying to optimize its performance. When the user swi
drawRect gets called on the main thread. But you don't have to do this. You can use the main thread to collect UI events and do the drawing on a background thread. The background thread gets notified whenever there are new touches and starts a drawing operation in its own CGBitmapContext. Then you create a CGImage and hand it over to the View: view.layer.contents = drawingImage
.
If you need even more performance, consider drawing using OpenGL.