I\'m working on a painting app that uses CoreGraphics for rendering. My problem is, for performance, I am trying to limit the updates to only certain portions of the view th
The accepted answer is wrong (or at least misleading).
Here's a simple code example of setNeedsDisplayInRect: working as advertised:
http://charcoaldesign.co.uk/resources/chalkboard.zip
I suspect that the Apple documentation is trying to explain the fact that on iOS every view backing image is converted to an OpenGL texture and the entire screen is re-composited every frame. That distinct from the question of whether your code has to clear and redraw the entire contents of the view's backing texture or not.
By using setNeedsDisplayInRect: you can avoid expensive redrawing of content that doesn't change between frames (which uses core graphics and is not hardware accelerated). The whole screen will still be redrawn regardless, but that doesn't matter because it's hardware accelerated by the GPU, unlike the code in drawRect: