I went through the TouchTracker project and understood it. I wanted to incorporate the basic idea into a little app that would draw rectangles, so I started a new Window-based project. I created a simple UIView that draws rectangles with the current touch start and end coordinates.
To my surprise it didn’t work. Whatever I would draw would stay on the screen as part of the view, so every new rectangle simple added another one. I downgraded to lines, thinking maybe I was doing something wrong with the Core Graphics functions. Now I had several lines that would stay on the screen; it seemed like there were about 10 most recent at any one time. Not the “rubberband” look I expected at all.
I reviewed the book and realized that the TouchDrawView was added through IB. I retooled my mini app to add my custom view via IB in this same fashion (as on pg 236), and suddenly it worked! (Good thing, because it was driving me crazy. )
So do views instantiated from NIBs have some different behavior or settings when it comes to Core Graphics functions? And is that why you opted to create the view as part of the NIB in this example?