How to track the touch vector?
<p>I need to calculate the direction of dragging a touch, to determine if the user is dragging up the screen, or down the screen.</p>

<p>Actually pretty simple, right? But:</p>

<p>1) Finger goes down, you get -touchesBegan:withEvent: called</p>

<p>2) Must wait until finger moves, and -touchesMoved:withEvent: gets called</p>

<p>3) Problem: At this point it's dangerous to tell if the user did drag up or down.</p>

<p>My thoughts: Check the time and accumulate calculates vectors until it's secure to tell the direction of touch.</p>

<p>Easy? No. Think about it: What if the user holds the finger down for 5 minutes on the same spot, but THEN decides to move up or down? BANG! Your code would fail, because it tried to determine the direction of touch when the finger didn't move really.</p>

<p>Problem 2: When the finger goes down and stays at the same spot for a few seconds because the user is a bit in the wind and thinks about what to do now, you'll get a lot of -touchesMoved:withEvent: calls very likely, but with very minor changes in touch location.</p>

<p>So my next thought: Do the accumulation in -touchesMoved:withEvent:, but only if a certain threshold of movement has been exceeded.</p>

<p>I bet you have some better concepts in place?</p>
