Skip to content

Commit

Permalink
Add nullability specifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperspacemark committed Sep 30, 2015
1 parent a30d5a5 commit 1dc074a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
4 changes: 4 additions & 0 deletions VENTokenField/VENBackspaceTextField.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@class VENBackspaceTextField;

@protocol VENBackspaceTextFieldDelegate <UITextFieldDelegate>
Expand All @@ -34,3 +36,5 @@
@property (weak, nonatomic) id<VENBackspaceTextFieldDelegate> backspaceDelegate;

@end

NS_ASSUME_NONNULL_END
6 changes: 5 additions & 1 deletion VENTokenField/VENToken.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@

#import <UIKit/UIKit.h>

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
17 changes: 10 additions & 7 deletions VENTokenField/VENTokenField.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@class VENTokenField;
@protocol VENTokenFieldDelegate <NSObject>
@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

Expand All @@ -47,7 +49,7 @@

- (void)reloadData;
- (void)collapse;
- (NSString *)inputText;
- (nullable NSString *)inputText;


/**-----------------------------------------------------------------------------
Expand All @@ -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

0 comments on commit 1dc074a

Please sign in to comment.