From 1dc074ac11b42009fd4c7a918667b188ccbc11f3 Mon Sep 17 00:00:00 2001 From: Mark Adams Date: Wed, 30 Sep 2015 10:28:31 -0400 Subject: [PATCH] Add nullability specifiers --- VENTokenField/VENBackspaceTextField.h | 4 ++++ VENTokenField/VENToken.h | 6 +++++- VENTokenField/VENTokenField.h | 17 ++++++++++------- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/VENTokenField/VENBackspaceTextField.h b/VENTokenField/VENBackspaceTextField.h index c33857c..ac8244a 100644 --- a/VENTokenField/VENBackspaceTextField.h +++ b/VENTokenField/VENBackspaceTextField.h @@ -22,6 +22,8 @@ #import +NS_ASSUME_NONNULL_BEGIN + @class VENBackspaceTextField; @protocol VENBackspaceTextFieldDelegate @@ -34,3 +36,5 @@ @property (weak, nonatomic) id backspaceDelegate; @end + +NS_ASSUME_NONNULL_END diff --git a/VENTokenField/VENToken.h b/VENTokenField/VENToken.h index 21768cb..fe939e2 100644 --- a/VENTokenField/VENToken.h +++ b/VENTokenField/VENToken.h @@ -22,12 +22,16 @@ #import +NS_ASSUME_NONNULL_BEGIN + @interface VENToken : UIView @property (assign, nonatomic) BOOL highlighted; -@property (copy, nonatomic) void (^didTapTokenBlock) (void); +@property (copy, nonatomic, nullable) void (^didTapTokenBlock) (void); @property (strong, nonatomic) UIColor *colorScheme; - (void)setTitleText:(NSString *)text; @end + +NS_ASSUME_NONNULL_END diff --git a/VENTokenField/VENTokenField.h b/VENTokenField/VENTokenField.h index 40df1f4..cb1e87e 100644 --- a/VENTokenField/VENTokenField.h +++ b/VENTokenField/VENTokenField.h @@ -22,12 +22,14 @@ #import +NS_ASSUME_NONNULL_BEGIN + @class VENTokenField; @protocol VENTokenFieldDelegate @optional - (void)tokenField:(VENTokenField *)tokenField didEnterText:(NSString *)text; - (void)tokenField:(VENTokenField *)tokenField didDeleteTokenAtIndex:(NSUInteger)index; -- (void)tokenField:(VENTokenField *)tokenField didChangeText:(NSString *)text; +- (void)tokenField:(VENTokenField *)tokenField didChangeText:(nullable NSString *)text; - (void)tokenFieldDidBeginEditing:(VENTokenField *)tokenField; @end @@ -47,7 +49,7 @@ - (void)reloadData; - (void)collapse; -- (NSString *)inputText; +- (nullable NSString *)inputText; /**----------------------------------------------------------------------------- @@ -66,18 +68,19 @@ @property (assign, nonatomic) UITextAutocorrectionType autocorrectionType; @property (assign, nonatomic) UITextAutocapitalizationType autocapitalizationType; -@property (assign, nonatomic) UIView *inputTextFieldAccessoryView; +@property (assign, nonatomic, nullable) UIView *inputTextFieldAccessoryView; @property (strong, nonatomic) UIColor *toLabelTextColor; -@property (strong, nonatomic) NSString *toLabelText; +@property (strong, nonatomic, nullable) NSString *toLabelText; @property (strong, nonatomic) UIColor *inputTextFieldTextColor; @property (strong, nonatomic) UILabel *toLabel; -@property (strong, nonatomic) NSArray *delimiters; -@property (copy, nonatomic) NSString *placeholderText; -@property (copy, nonatomic) NSString *inputTextFieldAccessibilityLabel; +@property (strong, nonatomic, nullable) NSArray *delimiters; +@property (copy, nonatomic, nullable) NSString *placeholderText; +@property (copy, nonatomic, nullable) NSString *inputTextFieldAccessibilityLabel; - (void)setColorScheme:(UIColor *)color; @end +NS_ASSUME_NONNULL_END