Updates: On March 31st this post was updated based on feedback on twitter about using NSCache
instead of static
.
I’ve been doing more and more drawing in code in my Cocoa projects recently and I’d like to share some tips, specifically how to cache drawing code into images for faster redraw. I’ve created a simple project for this post, the source of which can be found on GitHub.