summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuller, Alexander (A.) <amulle19@ford.com>2016-07-17 14:52:37 -0700
committerMuller, Alexander (A.) <amulle19@ford.com>2016-07-17 14:52:37 -0700
commit1ed1b8e331969d122def61e681dcbd54321493ba (patch)
tree37ed495ce6ebaff0126bf33985c6103ffb245471
parentc3dfc9818c1bdd8bac4e54c870a03c9e7fe3e204 (diff)
downloadsdl_ios-1ed1b8e331969d122def61e681dcbd54321493ba.tar.gz
Added missing non-null audited regions. Updated all properties to contain necessary attributes.
-rw-r--r--SmartDeviceLink/SDLPinchGesture.h14
-rw-r--r--SmartDeviceLink/SDLPinchGesture.m6
-rw-r--r--SmartDeviceLink/SDLTouch.h16
-rw-r--r--SmartDeviceLink/SDLTouch.m6
-rw-r--r--SmartDeviceLink/SDLTouchManager.h14
-rw-r--r--SmartDeviceLink/SDLTouchManager.m16
-rw-r--r--SmartDeviceLink/SDLTouchManagerListener.h4
7 files changed, 52 insertions, 24 deletions
diff --git a/SmartDeviceLink/SDLPinchGesture.h b/SmartDeviceLink/SDLPinchGesture.h
index c7e7cb577..69ffec09a 100644
--- a/SmartDeviceLink/SDLPinchGesture.h
+++ b/SmartDeviceLink/SDLPinchGesture.h
@@ -10,15 +10,19 @@
#import "SDLTouch.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLPinchGesture : NSObject
- (instancetype)initWithFirstTouch:(SDLTouch*)firstTouch secondTouch:(SDLTouch*)secondTouch;
-@property (nonatomic, strong) SDLTouch* firstTouch;
-@property (nonatomic, strong) SDLTouch* secondTouch;
+@property (nonatomic, copy) SDLTouch* firstTouch;
+@property (nonatomic, copy) SDLTouch* secondTouch;
-@property (nonatomic, readonly) CGFloat distance;
-@property (nonatomic, readonly) CGPoint center;
-@property (nonatomic, readonly) BOOL isValid;
+@property (nonatomic, assign, readonly) CGFloat distance;
+@property (nonatomic, assign, readonly) CGPoint center;
+@property (nonatomic, assign, readonly) BOOL isValid;
@end
+
+NS_ASSUME_NONNULL_END \ No newline at end of file
diff --git a/SmartDeviceLink/SDLPinchGesture.m b/SmartDeviceLink/SDLPinchGesture.m
index 6d1bd959b..3e522f8dd 100644
--- a/SmartDeviceLink/SDLPinchGesture.m
+++ b/SmartDeviceLink/SDLPinchGesture.m
@@ -11,6 +11,8 @@
#import "SDLTouch.h"
#import "CGPoint_Util.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLPinchGesture
@synthesize distance = _distance;
@@ -72,4 +74,6 @@
_center = CGPointZero;
}
-@end \ No newline at end of file
+@end
+
+NS_ASSUME_NONNULL_END \ No newline at end of file
diff --git a/SmartDeviceLink/SDLTouch.h b/SmartDeviceLink/SDLTouch.h
index 18a378853..4d5553eb6 100644
--- a/SmartDeviceLink/SDLTouch.h
+++ b/SmartDeviceLink/SDLTouch.h
@@ -15,15 +15,19 @@ typedef enum {
SDLTouchIdentifierSecondFinger = 1
} SDLTouchIdentifier;
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLTouch : NSObject
- (instancetype)initWithTouchEvent:(SDLTouchEvent*)touchEvent;
-@property (nonatomic, readonly) NSInteger identifier;
-@property (nonatomic, readonly) CGPoint location;
-@property (nonatomic, readonly) NSUInteger timeStamp;
+@property (nonatomic, assign, readonly) NSInteger identifier;
+@property (nonatomic, assign, readonly) CGPoint location;
+@property (nonatomic, assign, readonly) NSUInteger timeStamp;
+
+@property (nonatomic, assign, readonly) BOOL isFirstFinger;
+@property (nonatomic, assign, readonly) BOOL isSecondFinger;
-@property (nonatomic, readonly) BOOL isFirstFinger;
-@property (nonatomic, readonly) BOOL isSecondFinger;
+@end
-@end \ No newline at end of file
+NS_ASSUME_NONNULL_END \ No newline at end of file
diff --git a/SmartDeviceLink/SDLTouch.m b/SmartDeviceLink/SDLTouch.m
index b4b198458..2481ee69a 100644
--- a/SmartDeviceLink/SDLTouch.m
+++ b/SmartDeviceLink/SDLTouch.m
@@ -11,6 +11,8 @@
#import "SDLTouchEvent.h"
#import "SDLTouchCoord.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLTouch
- (instancetype)init {
@@ -57,4 +59,6 @@
return self.identifier == SDLTouchIdentifierSecondFinger;
}
-@end \ No newline at end of file
+@end
+
+NS_ASSUME_NONNULL_END \ No newline at end of file
diff --git a/SmartDeviceLink/SDLTouchManager.h b/SmartDeviceLink/SDLTouchManager.h
index f476b3314..6377a2022 100644
--- a/SmartDeviceLink/SDLTouchManager.h
+++ b/SmartDeviceLink/SDLTouchManager.h
@@ -9,25 +9,29 @@
#import <UIKit/UIKit.h>
#import "SDLTouchManagerListener.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLTouchManager : NSObject
-@property (nonatomic, weak) id<SDLTouchManagerListener> touchEventListener;
+@property (nonatomic, weak, nullable) id<SDLTouchManagerListener> touchEventListener;
/*
* Distance between taps.
*/
-@property (nonatomic) CGFloat tapDistanceThreshold;
+@property (nonatomic, assign) CGFloat tapDistanceThreshold;
/*
* Duration between taps (in seconds).
*/
-@property (nonatomic) CGFloat tapTimeThreshold;
+@property (nonatomic, assign) CGFloat tapTimeThreshold;
/*
* Time between pan events (in seconds).
*/
-@property (nonatomic) CGFloat movementTimeThreshold;
+@property (nonatomic, assign) CGFloat movementTimeThreshold;
-@property (nonatomic, getter=isTouchEnabled) BOOL touchEnabled;
+@property (nonatomic, assign, getter=isTouchEnabled) BOOL touchEnabled;
@end
+
+NS_ASSUME_NONNULL_END \ No newline at end of file
diff --git a/SmartDeviceLink/SDLTouchManager.m b/SmartDeviceLink/SDLTouchManager.m
index 839a5433a..3cd5ab989 100644
--- a/SmartDeviceLink/SDLTouchManager.m
+++ b/SmartDeviceLink/SDLTouchManager.m
@@ -19,6 +19,8 @@
#import "SDLTouchEvent.h"
#import "SDLTouchType.h"
+NS_ASSUME_NONNULL_BEGIN
+
typedef NS_ENUM(NSUInteger, SDLPerformingTouchType) {
SDLPerformingTouchTypeNone,
SDLPerformingTouchTypeSingleTouch,
@@ -30,20 +32,20 @@ static NSUInteger const MaximumNumberOfTouches = 2;
@interface SDLTouchManager () <SDLProxyListener>
-@property SDLTouch* previousTouch;
+@property (nonatomic, strong, nullable) SDLTouch* previousTouch;
/*
* Only used for caching previous single taps for double tap detection
*/
-@property SDLTouch* singleTapTouch;
+@property (nonatomic, strong, nullable) SDLTouch* singleTapTouch;
-@property CGFloat previousPinchDistance;
+@property (nonatomic, assign) CGFloat previousPinchDistance;
-@property SDLPinchGesture* currentPinchGesture;
+@property (nonatomic, strong, nullable) SDLPinchGesture* currentPinchGesture;
-@property dispatch_source_t singleTapTimer;
+@property (nonatomic, strong, nullable) dispatch_source_t singleTapTimer;
-@property SDLPerformingTouchType performingTouchType;
+@property (nonatomic, assign) SDLPerformingTouchType performingTouchType;
@end
@@ -244,3 +246,5 @@ static NSUInteger const MaximumNumberOfTouches = 2;
}
@end
+
+NS_ASSUME_NONNULL_END \ No newline at end of file
diff --git a/SmartDeviceLink/SDLTouchManagerListener.h b/SmartDeviceLink/SDLTouchManagerListener.h
index bb911a870..5d8ab95bf 100644
--- a/SmartDeviceLink/SDLTouchManagerListener.h
+++ b/SmartDeviceLink/SDLTouchManagerListener.h
@@ -8,6 +8,8 @@
@class SDLTouchManager;
+NS_ASSUME_NONNULL_BEGIN
+
@protocol SDLTouchManagerListener <NSObject>
@optional
@@ -23,3 +25,5 @@
- (void)touchManager:(SDLTouchManager*)manager pinchDidEndAtCenterPoint:(CGPoint)point;
@end
+
+NS_ASSUME_NONNULL_END \ No newline at end of file