iphone Programming Glossary: getdistance
Implementing touch-based rotation in cocoa touch http://stackoverflow.com/questions/2780536/implementing-touch-based-rotation-in-cocoa-touch touches anyObject CGPoint currentPoint touch locationInView self current position of touch if touch view self Utility getDistance currentPoint toPoint self.middle ROTATE_RADIUS middle is centre of view Utility getDistance currentPoint toPoint self.middle.. if touch view self Utility getDistance currentPoint toPoint self.middle ROTATE_RADIUS middle is centre of view Utility getDistance currentPoint toPoint self.middle MOVE_RADIUS will be rotation gesture remember state of view at beginning of touch CGPoint.. touches anyObject CGPoint currentPoint touch locationInView self current position of touch if touch view self Utility getDistance currentPoint toPoint self.middle ROTATE_RADIUS Utility getDistance currentPoint toPoint self.middle MOVE_RADIUS a rotation..
|