Besides Silver Challenge There is still a Big Bug


#1

when runing the example from the book on my iPhone, I found another bug!!
while you are drawing a line with your index finger on the iPhone screen, you double tap your middle finger to trigger the doubleTap: method, the finished lines and line in Progress all disappear as expected but when you raise your index finger that just drawed the line the app crashes immediately!

it bothered me for a while, then it come to me that when the douleTap: is running, it will destroy the _lineInProgress, but that UITouch object is still alive, when you raise that finger
touchEnded:withEvent: is called, which lead to adding a nil object(BNRLine) to self.finishedLines (adding a nil value to dictionary is a terrible error)! So I add an if statement to avoid that.