The Pinch Toggle Gesture patch recognizes a pinch gesture, and toggles between two states when the gesture finishes. Upon recognizing that a pinch gesture has occurred, it will cancel all other interactions on the view or its subviews.
Pinch gestures are commonly used to scale a view.
State A: Position
The position to use for the first state.
State A: Rotation
The rotation to use for the first state.
State A: Scale
The scale to use for the first state.
State B: Position
The position to use for the second state.
State B: Rotation
The rotation to use for the second state.
State B: Scale
The scale to use for the second state.
Tap To Toggle
A boolean that indicates whether the patch should toggle between states when the view is tapped.
State A
An input that flips the gesture to the first state.
State B
An input that flips the gesture to the second state.
Gesture
The gesture connection port used to link the gesture to a view.
Position
The total amount of X/Y translation that has occurred. This will instantly snap to state A or B when the gesture finishes.
Rotation
The current rotation of the view. This will instantly snap to state A or B when the gesture finishes.
Scale
The current scale of the view. This will instantly snap to state A or B depending on the position and velocity when the gesture finishes.
A/B
A continuous number value between 0-1 that represents whether the patch is in state A or B.
Active
A boolean value that represents whether the patch has recognized a pan gesture.