Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
Documentation
SDLPinchGesture

SDLPinchGesture Class Reference

Section Contents

Overview

Pinch Gesture information

-initWithFirstTouch:secondTouch:

@abstract Initializes a pinch gesture.

Objective-C

- (nonnull instancetype)initWithFirstTouch:(nonnull SDLTouch *)firstTouch
                               secondTouch:(nonnull SDLTouch *)secondTouch;

Swift

init(firstTouch: SDLTouch, secondTouch: SDLTouch)

Parameters

firstTouch

First touch of the gesture

secondTouch

Second touch of the gesture

Return Value

SDLPinchGesture Instance of SDLPinchGesture.

firstTouch

@abstract First touch of a pinch gesture.

Objective-C

@property (nonatomic, strong) SDLTouch *_Nonnull firstTouch;

Swift

var firstTouch: SDLTouch { get set }

secondTouch

@abstract Second touch of a pinch gesture.

Objective-C

@property (nonatomic, strong) SDLTouch *_Nonnull secondTouch;

Swift

var secondTouch: SDLTouch { get set }

distance

@abstract Distance between first and second touches.

Objective-C

@property (nonatomic, readonly) CGFloat distance;

Swift

var distance: CGFloat { get }

center

@abstract Center point between first and second touches.

Objective-C

@property (nonatomic, readonly) CGPoint center;

Swift

var center: CGPoint { get }

isValid

@abstract Returns whether or not the pinch gesture is valid. This is true if both touches are non null.

Objective-C

@property (nonatomic, readonly) BOOL isValid;

Swift

var isValid: Bool { get }
View on GitHub.com
Previous Section Next Section