diff --git a/.travis.yml b/.travis.yml index a130fdf..aa1bf63 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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; diff --git a/Podfile b/Podfile index 0c986ae..0d72122 100644 --- a/Podfile +++ b/Podfile @@ -6,6 +6,6 @@ target "VENTokenFieldSample" do end target "VENTokenFieldSampleTests" do - pod 'KIF', '~> 3.1' + pod 'KIF', '~> 3.3' end diff --git a/Podfile.lock b/Podfile.lock index bf888ed..1672be3 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -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: @@ -16,7 +16,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: FrameAccessor: 0f7ba6ce37be9a5d0302a27c731dca70af8d438b - KIF: a94bffe9c97e449e44f8fa481c53243d21309e1e + KIF: 0a82046d06f3648799cac522d2d0f7934214caac VENTokenField: 034a40ba41103f14417e5f44b82def23a774db8a -COCOAPODS: 0.37.2 +COCOAPODS: 0.38.2 diff --git a/VENTokenField.xcodeproj/project.pbxproj b/VENTokenField.xcodeproj/project.pbxproj index 4db1800..438e906 100644 --- a/VENTokenField.xcodeproj/project.pbxproj +++ b/VENTokenField.xcodeproj/project.pbxproj @@ -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 = ""; }; - B6173E191952760200E293BB /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - B6173E1B1952760200E293BB /* VENTokenFieldTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VENTokenFieldTests.m; sourceTree = ""; }; 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 = ""; }; @@ -96,7 +93,6 @@ B6173DF31952760200E293BB = { isa = PBXGroup; children = ( - B6173E151952760200E293BB /* VENTokenFieldTests */, B692A4741954D9CA00344E36 /* VENTokenFieldSample */, B692A4921954D9CA00344E36 /* VENTokenFieldSampleTests */, B6173DFE1952760200E293BB /* Frameworks */, @@ -128,24 +124,6 @@ name = Frameworks; sourceTree = ""; }; - B6173E151952760200E293BB /* VENTokenFieldTests */ = { - isa = PBXGroup; - children = ( - B6173E1B1952760200E293BB /* VENTokenFieldTests.m */, - B6173E161952760200E293BB /* Supporting Files */, - ); - path = VENTokenFieldTests; - sourceTree = ""; - }; - B6173E161952760200E293BB /* Supporting Files */ = { - isa = PBXGroup; - children = ( - B6173E171952760200E293BB /* VENTokenFieldTests-Info.plist */, - B6173E181952760200E293BB /* InfoPlist.strings */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; B692A4741954D9CA00344E36 /* VENTokenFieldSample */ = { isa = PBXGroup; children = ( @@ -389,14 +367,6 @@ /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ - B6173E181952760200E293BB /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - B6173E191952760200E293BB /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; B692A4771954D9CA00344E36 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( 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/VENToken.m b/VENTokenField/VENToken.m index 0b353ab..300665e 100644 --- a/VENTokenField/VENToken.m +++ b/VENTokenField/VENToken.m @@ -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]; 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 diff --git a/VENTokenFieldTests/VENTokenFieldTests-Info.plist b/VENTokenFieldTests/VENTokenFieldTests-Info.plist deleted file mode 100644 index 3c4e571..0000000 --- a/VENTokenFieldTests/VENTokenFieldTests-Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.venmo.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/VENTokenFieldTests/VENTokenFieldTests.m b/VENTokenFieldTests/VENTokenFieldTests.m deleted file mode 100644 index 70dbbde..0000000 --- a/VENTokenFieldTests/VENTokenFieldTests.m +++ /dev/null @@ -1,17 +0,0 @@ -// -// VENTokenFieldTests.m -// VENTokenFieldTests -// -// Created by Ayaka Nonaka on 6/18/14. -// Copyright (c) 2014 Venmo. All rights reserved. -// - -#import - -@interface VENTokenFieldTests : XCTestCase - -@end - -@implementation VENTokenFieldTests - -@end diff --git a/VENTokenFieldTests/en.lproj/InfoPlist.strings b/VENTokenFieldTests/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28f..0000000 --- a/VENTokenFieldTests/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ -