TouchsMoved <-- 我只能看到 y 点
为什么我只能看到 nowPoint 的“y”分量发生变化,[“x”分量始终为“0”]?
- (void) touchesMoved: (NSSet *) touches withEvent: (UIEvent *) event {
[super touchesMoved:touches withEvent:event];
CGPoint nowPoint = [[touches anyObject] locationInView:self.view];
CGPoint prevPoint = [[touches anyObject] previousLocationInView:self.view];
NSLog(@"x %d, y %d", nowPoint.x, nowPoint.y);
}
NSLog(@"x %d, y %d", nowPoint.x, nowPoint.y);
将其更改为...
NSLog(@"x %d, y %d", nowPoint.x, nowPoint.y);
Change this to...