Pinch to zoom with CCParallaxNode
问题 How do I implement pinch to zoom to a parallax scrolling node ? 回答1: Here's the solution: - (void)handlePitchZoom:(NSSet *)touches withEvent:(UIEvent *)event { UITouch* touch1 = [[[event allTouches] allObjects] objectAtIndex:0]; UITouch* touch2 = [[[event allTouches] allObjects] objectAtIndex:1]; // calculate scale value double prevDistance = ccpDistance([touch1 previousLocationInView:[touch1 view]], [touch2 previousLocationInView:[touch2 view]]); double newDistance = ccpDistance([touch1