-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent*)event {
UITouch*pTouch = touches.anyObject;
//self.view
CGPointposition = [pTouchlocationInView:self.view];
//self.myView
CGPointposition2 = [pTouchlocationInView:self.myView];
NSLog(@"开始1 %@",NSStringFromCGPoint(position));
NSLog(@"开始2 %@",NSStringFromCGPoint(position2));
}
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent*)event {
UITouch*pTouch = touches.anyObject;
CGPointposition = [pTouchlocationInView:self.view];
NSLog(@"移动%@",NSStringFromCGPoint(position));
}
-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent*)event {
UITouch*pTouch = touches.anyObject;
CGPointposition = [pTouchlocationInView:self.view];
###|||https://www.ky929.com|||###
NSLog(@"抬起%@",NSStringFromCGPoint(position));
}