Well, this is a pretty sweet gift to the iOS world: Steve Sprang has open sourced full fledged drawing and painting apps!
Inkpad is a vector illustration app designed from scratch for the iPad. It supports paths, compound paths, text, images, groups, masks, gradient fills, and an unlimited number of layers.
Inkpad was designed with performance in mind – it can easily handle drawings with hundreds to thousands of shapes without bogging down. Export your finished illustrations directly to your Dropbox as SVG or PDF…
Brushes is a painting app designed exclusively for the iPhone, iPod touch, and iPad. Rewritten from the ground up, Brushes 3 is universal — the same version runs on both your iPhone and your iPad. Move paintings between your devices and keep working wherever you go!
An accelerated OpenGL-based painting engine makes painting incredibly smooth and responsive — even with huge brush sizes. Brushes also records every step in your painting. Show off your creative process by replaying your paintings directly on your device…
That’s quite the additions to your sample code reference set, isn’t it now?