Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

DrWeird

macrumors newbie
Original poster
Jul 27, 2008
3
0
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!
 
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??
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.