Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nullability annotations #81

Merged
merged 6 commits into from
Sep 30, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add nullability specifiers
  • Loading branch information
hyperspacemark committed Sep 30, 2015
commit 1dc074ac11b42009fd4c7a918667b188ccbc11f3
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