diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 2d73916506887726cd3d934561a03ad2bb60bef4..0000000000000000000000000000000000000000 Binary files a/.DS_Store and /dev/null differ diff --git a/Pods/VENTokenField/VENTokenField/VENTokenField.h b/Pods/VENTokenField/VENTokenField/VENTokenField.h index 45bf61a9c2a7f0f27b291ca041063a58d6cca99b..040b844e3037d0bb0267cea029c01b84c6361c24 100644 --- a/Pods/VENTokenField/VENTokenField/VENTokenField.h +++ b/Pods/VENTokenField/VENTokenField/VENTokenField.h @@ -55,6 +55,7 @@ NS_ASSUME_NONNULL_BEGIN @property (weak, nonatomic) id<VENTokenFieldDataSource> dataSource; @property (strong, nonatomic, nonnull) NSMutableArray<NSString *> *textTokens; @property (strong, nonatomic, nonnull) NSMutableArray<NSString *> *mailTokens; +@property (atomic) BOOL readOnly; - (void)reloadData; - (void)collapse; diff --git a/Pods/VENTokenField/VENTokenField/VENTokenField.m b/Pods/VENTokenField/VENTokenField/VENTokenField.m index e3a2a4d3a0cc1842a7a4ff5c5a5449189a3de6ef..33fdda2a745385ac43b94cdc7869d9546e70ae0e 100644 --- a/Pods/VENTokenField/VENTokenField/VENTokenField.m +++ b/Pods/VENTokenField/VENTokenField/VENTokenField.m @@ -85,6 +85,7 @@ static const CGFloat VENTokenFieldDefaultMaxHeight = 2000.0;//150.0; - (void)setUpInit { + _readOnly = false; _textTokens = [NSMutableArray array]; _mailTokens = [NSMutableArray array]; _enter = false; @@ -96,9 +97,9 @@ static const CGFloat VENTokenFieldDefaultMaxHeight = 2000.0;//150.0; self.horizontalInset = VENTokenFieldDefaultHorizontalInset; self.tokenPadding = VENTokenFieldDefaultTokenPadding; self.minInputWidth = VENTokenFieldDefaultMinInputWidth; - self.colorScheme = [UIColor blueColor]; - self.toLabelTextColor = [UIColor colorWithRed:112/255.0f green:124/255.0f blue:124/255.0f alpha:1.0f]; - self.inputTextFieldTextColor = [UIColor colorWithRed:38/255.0f green:39/255.0f blue:41/255.0f alpha:1.0f]; + self.colorScheme = [UIColor darkGrayColor]; + self.toLabelTextColor = [UIColor darkGrayColor]; + self.inputTextFieldTextColor = [UIColor blackColor]; //[self addTarget:self action:@selector(delegate:tokenFieldDidEndEditing:) forControlEvents:UIControlEventEditingChanged]; [_inputTextField addTarget:self action:@selector(inputTextFieldEditingEnd:) forControlEvents:UIControlEventEditingDidEnd]; @@ -263,7 +264,7 @@ static const CGFloat VENTokenFieldDefaultMaxHeight = 2000.0;//150.0; - (void)layoutInputTextFieldWithCurrentX:(CGFloat *)currentX currentY:(CGFloat *)currentY clearInput:(BOOL)clearInput { CGFloat inputTextFieldWidth = self.scrollView.contentSize.width - *currentX; - if (inputTextFieldWidth < self.minInputWidth) { + if (!_readOnly && inputTextFieldWidth < self.minInputWidth) { inputTextFieldWidth = self.scrollView.contentSize.width; *currentY += [self heightForToken]; *currentX = 0; @@ -318,10 +319,12 @@ static const CGFloat VENTokenFieldDefaultMaxHeight = 2000.0;//150.0; token.didTapTokenBlock = ^{ [weakSelf didTapToken:weakToken]; }; - - [token setTitleText:[NSString stringWithFormat:@"%@,", title]]; + if (i == [self numberOfTokens] - 1) { + [token setTitleText:[NSString stringWithFormat:@"%@", title]]; + } else { + [token setTitleText:[NSString stringWithFormat:@"%@,", title]]; + } token.colorScheme = [self colorSchemeForTokenAtIndex:i]; - [self.tokens addObject:token]; if (*currentX + token.width <= self.scrollView.contentSize.width) { // token fits in current line @@ -374,7 +377,7 @@ static const CGFloat VENTokenFieldDefaultMaxHeight = 2000.0;//150.0; if (!_toLabel) { _toLabel = [[UILabel alloc] initWithFrame:CGRectZero]; _toLabel.textColor = self.toLabelTextColor; - _toLabel.font = [UIFont systemFontOfSize: 17.0];//[UIFont fontWithName:@"HelveticaNeue" size:15.5]; + _toLabel.font = [UIFont systemFontOfSize: 15.0];//[UIFont fontWithName:@"HelveticaNeue" size:15.5]; _toLabel.x = 0; [_toLabel sizeToFit]; [_toLabel setHeight:[self heightForToken]]; @@ -412,6 +415,9 @@ static const CGFloat VENTokenFieldDefaultMaxHeight = 2000.0;//150.0; - (VENBackspaceTextField *)inputTextField { + if (_readOnly) { + return nil; + } if (!_inputTextField) { _inputTextField = [[VENBackspaceTextField alloc] init]; [_inputTextField setKeyboardType:self.inputTextFieldKeyboardType]; @@ -477,6 +483,10 @@ static const CGFloat VENTokenFieldDefaultMaxHeight = 2000.0;//150.0; - (void)didTapToken:(VENToken *)token { + if (_readOnly) { + [self.delegate tokenField:self didTappedTokenTwice:[self.tokens indexOfObject:token]]; + return; + } VENToken * tempToken = nil; for (VENToken *aToken in self.tokens) { if (aToken == token) { @@ -512,7 +522,7 @@ static const CGFloat VENTokenFieldDefaultMaxHeight = 2000.0;//150.0; BOOL visible = [highlightedTokens count] == 0; if (visible) { [self inputTextFieldBecomeFirstResponder]; - } else { + } else if (!_readOnly) { [self.invisibleTextField becomeFirstResponder]; } }