Take the 2-minute tour ×  How can I get touch offset when using
UITouch? I am doing a project like a remote control. I have a
view set to multi-touched and I want the view to act like a
touch pad for Mac, so I need the touch offsets when people move
to control the mouse. Any ideas?  share|improve this question
Did my answer help you? –  0x7fffffff Aug 17 '12 at 17:50 add
comment  1 Answer  up vote 0 down vote accepted  This can be
accomplished with a UIPanGestureRecognizer by measuring the
diagonal distance from the center of the screen to the current
touch location.  #import <QuartzCore/QuartzCore.h>  Declare the
gesture and hook it to self.view so that the entire screen
responds to touch events.  UIPanGestureRecognizer *pan =
[[UIPanGestureRecognizer alloc] initWithTarget:self
action:@selector(myPanRecognizerMethod:)]; [pan
setDelegate:self]; [pan setMaximumNumberOfTouches:2]; [pan
setMinimumNumberOfTouches:1]; [self.view
setUserInteractionEnabled:YES]; [self.view
addGestureRecognizer:pan];  Then in this me