Thursday, October 8, 2009

Two Finger Rotate

Here is an Xcode project that shows how to do the two-finger rotate gesture. It's pretty straightforward, it just uses a CGAffineTransform to rotate the text on the screen to the same angle as the angle between the user's two fingers.

This project does not deal with the fact that touches come into the responder methods unordered, so you may notice some minor glitches if you try and do more than a 180° rotation. That's a subject for a future blog posting.

0 nhận xét:

Post a Comment

 
Design by Wordpress Theme | Bloggerized by Free Blogger Templates | coupon codes