PinchGesture
public struct PinchGesture : Gesture
Wrapper of UIPinchGestureRecognizer A discrete gesture recognizer that interprets pinching gestures involving two touches.
PinchGesture(scale: 3) { pinch in
// pinch action
}
-
The action to handle the gesture recognized by the receiver.
Declaration
Swift
public var action: (UIGestureRecognizer) -> Void { get }
-
The gesture behind the PinchGesture.
Declaration
Swift
public var gesture: UIGestureRecognizer { get }
-
Initializer
Declaration
Swift
public init(scale: CGFloat, onPinchGesture: @escaping (_ gesture: UIGestureRecognizer) -> Void)
Parameters
scale
The scale factor relative to the points of the two touches in screen coordinates.
onPinchGesture
The action to handle the gesture recognized by the receiver.