PDA

View Full Version : Updating Touch Positions




DrWeird
Jul 27, 2008, 05:46 PM
I'm trying to develop the same type of "multi-touch pinch/anti-pinch zoom" that safari, etc use, and thusly had this question: How is it that you can get the current position of the two active touches in real-time? I can get the touches when such event occur as "touchesBegan", "touchesEnded", "touchesMoved", but not in the intervening time. How would I go about that? I'm stumped. I'm trying to get these positions to determine whether the two touches are moving apart or getting closer together, so the screen can be AffineTransformed larger or smaller while the touch is going on (you all know how this works in Safari). Thanks!



DrWeird
Jul 29, 2008, 07:51 AM
Alternatively, is there any way to get a loop running to check and update the location of the touch while the touch is going on? Since all the calls in Cocoa Touch seem to be event-based, is there any way to get a loop to always be running without locking up the action? I think my biggest problem is not knowing how to get a loop to run while the touch is actually in the act of moving (after it Begins, but before it has Ended). Help??