/
SDLPinchGesture.h
62 lines (50 loc) 路 1.29 KB
/
SDLPinchGesture.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//
// SDLPinchGesture.h
// SmartDeviceLink-iOS
//
// Created by Muller, Alexander (A.) on 6/14/16.
// Copyright 漏 2016 smartdevicelink. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "SDLTouch.h"
NS_ASSUME_NONNULL_BEGIN
@interface SDLPinchGesture : NSObject
/**
* @abstract
* Initializes a pinch gesture.
* @param firstTouch
* First touch of the gesture
* @param secondTouch
* Second touch of the gesture
* @return SDLPinchGesture
* Instance of SDLPinchGesture.
*/
- (instancetype)initWithFirstTouch:(SDLTouch*)firstTouch secondTouch:(SDLTouch*)secondTouch;
/**
* @abstract
* First touch of a pinch gesture.
*/
@property (nonatomic, strong) SDLTouch* firstTouch;
/**
* @abstract
* Second touch of a pinch gesture.
*/
@property (nonatomic, strong) SDLTouch* secondTouch;
/**
* @abstract
* Distance between first and second touches.
*/
@property (nonatomic, assign, readonly) CGFloat distance;
/**
* @abstract
* Center point between first and second touches.
*/
@property (nonatomic, assign, readonly) CGPoint center;
/**
* @abstract
* Returns whether or not the pinch gesture is valid. This is true if both touches
* are non null.
*/
@property (nonatomic, assign, readonly) BOOL isValid;
@end
NS_ASSUME_NONNULL_END