Skip to content

Instantly share code, notes, and snippets.

@steffex
Created April 25, 2014 10:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steffex/11285010 to your computer and use it in GitHub Desktop.
Save steffex/11285010 to your computer and use it in GitHub Desktop.
Get usertouch
- (CGPoint)getUserTouchFromSet:(NSSet *)touches
{
UITouch *touch = [[touches allObjects] objectAtIndex:0];
CGPoint touchPoint = [touch locationInNode: self];
return touchPoint;
}
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
CGPoint userTouch = [self getUserTouchFromSet: touches];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment