Pinch Gestures
TapKit supports four pinch actions:Parameters
| Parameter | Type | Options | Description |
|---|---|---|---|
point | tuple/Point | - | Center point for the pinch gesture |
action | str | "pinch_in", "pinch_out", "rotate_cw", "rotate_ccw" | Type of pinch action |
Action Types
| Action | Fingers Movement | Effect |
|---|---|---|
pinch_out | Moving apart | Zoom in |
pinch_in | Moving together | Zoom out |
rotate_cw | Rotating clockwise | Rotate content clockwise |
rotate_ccw | Rotating counter-clockwise | Rotate content counter-clockwise |
Use Cases
Zoom In on Content
Zoom Out
Zoom at Specific Location
Rotate an Image
Maps Navigation
Examples
Photo Viewer Workflow
Reset Zoom
Tips
Center point matters
Center point matters
The pinch gesture centers on the point you specify. Choose your center carefully - zooming into the corner vs center gives very different results.
Combine with pan for navigation
Combine with pan for navigation
Double-tap for quick zoom
Double-tap for quick zoom
For simpler zoom toggling,
double_tap() often works as a quick zoom in/out in many apps.