Post

Replies

Boosts

Views

Activity

iOS18 UIPinchGestureRecognizer finger change
Before ios18, when two fingers are switched to single fingers, the printing scale value will not change. When switching to two fingers again, the pinch and zoom printing scale will change. The same operation is performed after ios18, and two fingers are switched to single fingers. Switch back to two fingers, and the scale printing will not change. code here: - (void)pinchGesture:(UIPinchGestureRecognizer *)recognizer { NSSet <UIEvent*> *events = [recognizer valueForKey:@"_activeEvents"]; UIEvent *event = [events anyObject]; if (recognizer.state == UIGestureRecognizerStateBegan) { NSLog(@"---- begin finger count: %d scale: %f",event.allTouches.count,recognizer.scale); recognizer.scale = 1.0; } else if (recognizer.state == UIGestureRecognizerStateChanged) { NSLog(@"---- change finger count: %d scale: %f",event.allTouches.count,recognizer.scale); // recognizer.scale = 1.0; } log image for iOS 17.7 log image for ios18.0.2
0
0
135
1w