drawRect
passes in a rectangle which represents the area of your view to re-draw. The Apple Docs say:
Your implementation of this method should redraw the specified area of the view as quickly as possible
What is not clear to me is how you should actually proceed to use this rectangle that is passed in. Suppose your view is made up of a single Bezier Curve and drawRect
asks you draw only part of that curve. Well, even this simple example is non-trivial since you must break up the curve to find the part that lies only within the rectangle.
In nearly all the example code I see for drawRect
the actual argument to the method is entirely ignored. So perhaps the typical case is to just ignore this argument? What happens if you draw based on the entire view's bounds in mind, but you instead only receives a small portion of that view to this method?