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 all commits
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
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
language: objective-c
osx_image: xcode7
before_install:
- gem i cocoapods --no-ri --no-rdoc
- brew uninstall xctool; brew install xctool --HEAD;
Expand Down
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ target "VENTokenFieldSample" do
end

target "VENTokenFieldSampleTests" do
pod 'KIF', '~> 3.1'
pod 'KIF', '~> 3.3'
end

12 changes: 6 additions & 6 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
PODS:
- FrameAccessor (1.3.2)
- KIF (3.2.3):
- KIF/XCTest (= 3.2.3)
- KIF/XCTest (3.2.3)
- KIF (3.3.0):
- KIF/Core (= 3.3.0)
- KIF/Core (3.3.0)
- VENTokenField (2.4.0):
- FrameAccessor (~> 1.0)

DEPENDENCIES:
- KIF (~> 3.1)
- KIF (~> 3.3)
- VENTokenField (from `.`)

EXTERNAL SOURCES:
Expand All @@ -16,7 +16,7 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
FrameAccessor: 0f7ba6ce37be9a5d0302a27c731dca70af8d438b
KIF: a94bffe9c97e449e44f8fa481c53243d21309e1e
KIF: 0a82046d06f3648799cac522d2d0f7934214caac
VENTokenField: 034a40ba41103f14417e5f44b82def23a774db8a

COCOAPODS: 0.37.2
COCOAPODS: 0.38.2
30 changes: 0 additions & 30 deletions VENTokenField.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@
B6173DFF1952760200E293BB /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
B6173E0D1952760200E293BB /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
B6173E101952760200E293BB /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; };
B6173E171952760200E293BB /* VENTokenFieldTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "VENTokenFieldTests-Info.plist"; sourceTree = "<group>"; };
B6173E191952760200E293BB /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
B6173E1B1952760200E293BB /* VENTokenFieldTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VENTokenFieldTests.m; sourceTree = "<group>"; };
B692A46F1954D9CA00344E36 /* VENTokenFieldSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = VENTokenFieldSample.app; sourceTree = BUILT_PRODUCTS_DIR; };
B692A4711954D9CA00344E36 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
B692A4761954D9CA00344E36 /* VENTokenFieldSample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "VENTokenFieldSample-Info.plist"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -96,7 +93,6 @@
B6173DF31952760200E293BB = {
isa = PBXGroup;
children = (
B6173E151952760200E293BB /* VENTokenFieldTests */,
B692A4741954D9CA00344E36 /* VENTokenFieldSample */,
B692A4921954D9CA00344E36 /* VENTokenFieldSampleTests */,
B6173DFE1952760200E293BB /* Frameworks */,
Expand Down Expand Up @@ -128,24 +124,6 @@
name = Frameworks;
sourceTree = "<group>";
};
B6173E151952760200E293BB /* VENTokenFieldTests */ = {
isa = PBXGroup;
children = (
B6173E1B1952760200E293BB /* VENTokenFieldTests.m */,
B6173E161952760200E293BB /* Supporting Files */,
);
path = VENTokenFieldTests;
sourceTree = "<group>";
};
B6173E161952760200E293BB /* Supporting Files */ = {
isa = PBXGroup;
children = (
B6173E171952760200E293BB /* VENTokenFieldTests-Info.plist */,
B6173E181952760200E293BB /* InfoPlist.strings */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
B692A4741954D9CA00344E36 /* VENTokenFieldSample */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -389,14 +367,6 @@
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
B6173E181952760200E293BB /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
B6173E191952760200E293BB /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
B692A4771954D9CA00344E36 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
Expand Down
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
1 change: 1 addition & 0 deletions VENTokenField/VENToken.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ @implementation VENToken

- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
self = [[[NSBundle bundleForClass:[self class]] loadNibNamed:NSStringFromClass([self class]) owner:self options:nil] firstObject];
if (self) {
[self setUpInit];
Expand Down
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
22 changes: 0 additions & 22 deletions VENTokenFieldTests/VENTokenFieldTests-Info.plist

This file was deleted.

17 changes: 0 additions & 17 deletions VENTokenFieldTests/VENTokenFieldTests.m

This file was deleted.

2 changes: 0 additions & 2 deletions VENTokenFieldTests/en.lproj/InfoPlist.strings

This file was deleted.