The sample code in the book is very good, and for simple images makes sense, but it leads me to a question.
If one wanted to build a complex image, say 100 squares or circles for example, that changed, but not constantly, would one build the view up with a hundred little subviews? Of just redraw the required portions of the entire view with a setNeedsDisplay call?
Looking at some of the apps I have seen, a lot of games are built with with a large view that are created on a grid fashion, with portions updated as needed, usually small sections.
Using subviews seems logical, but wouldn’t that be a significant tax on memory and processing? And on the other hand using a large single view, would setNeedsDisplay retain the drawing context of the large view? Would it make sense to over write drawRect to accept parameters.