diff --git a/Pods/VENTokenField/VENTokenField/VENTokenField.m b/Pods/VENTokenField/VENTokenField/VENTokenField.m index abc1027e5e2c8e510c25a63e9f8d9b1cc6cbe86d..fdf0eb01f2479862e30c5b0b9f232e8f88d3b779 100644 --- a/Pods/VENTokenField/VENTokenField/VENTokenField.m +++ b/Pods/VENTokenField/VENTokenField/VENTokenField.m @@ -319,13 +319,12 @@ static const CGFloat VENTokenFieldDefaultMaxHeight = 2000.0;//150.0; token.didTapTokenBlock = ^{ [weakSelf didTapToken:weakToken]; }; - if (_tokens.count > 1) { - [token setTitleText:[NSString stringWithFormat:@"%@,", title]]; - } else { + 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 @@ -485,9 +484,7 @@ static const CGFloat VENTokenFieldDefaultMaxHeight = 2000.0;//150.0; - (void)didTapToken:(VENToken *)token { if (_readOnly) { - token.highlighted = YES; [self.delegate tokenField:self didTappedTokenTwice:[self.tokens indexOfObject:token]]; - token.highlighted = NO; return; } VENToken * tempToken = nil;