Return to Snippet

Revision: 28431
at July 8, 2010 07:01 by tonic


Initial Code
- (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event {
	UITouch *touch = [[event allTouches] anyObject];
	CGPoint pos = [touch locationInView: [UIApplication sharedApplication].keyWindow];
	NSLog(@"Position of touch: %.3f, %.3f", pos.x, pos.y);
	
}

- (void) touchesMoved:(NSSet*)touches withEvent:(UIEvent*)event {
	UITouch *touch = [[event allTouches] anyObject];
	CGPoint pos = [touch locationInView: [UIApplication sharedApplication].keyWindow];
	NSLog(@"Position of touch: %.3f, %.3f", pos.x, pos.y);
	
}

Initial URL


Initial Description


Initial Title
Evento Touch con posición

Initial Tags
event

Initial Language
Objective C