I'm writing a checkers game based on the Apple Autoscroll example (
http://developer.apple.com/iphone/li...inkElementID_2), and I'm having trouble with moving the game piece; touchesCancelled fires if I move the game piece more than a few pixels, thus stopping the movement.
The code, which I've attached, revolves around 2 classes: TokenImageView, which handles all the token touch events; and RootViewController, which adds all the scroll and image views and acts as the TokenImageView delegate.
As far as I can tell, the code is doing exactly what I want it to do, except that after I move the game piece a little I get a touchesCancelled event, which I can't explain.
What causes this event to fire? Apple documentation says a memory warning will do this. I don't see memory growing as I move the tokens, am I missing something?
This code is largely based off Apple's code, so it's quite possible I did something fundamentally wrong when I changed the code.
I look forward to hearing your thoughts.
Edit: After closer examination, the touchesCancelled event is called only after the token is moved a certain distance from the origin. The token can move indefinitely as long as it stays within ~10 pixels from where it started.
I should also note I'm testing this in the simulator only, so that takes away the possibility of multiple touches.