Skip to content
Snippets Groups Projects
Commit 932580f2 authored by Joscha's avatar Joscha
Browse files

work in progress

parent babe5581
Branches
Tags
No related merge requests found
...@@ -319,13 +319,12 @@ static const CGFloat VENTokenFieldDefaultMaxHeight = 2000.0;//150.0; ...@@ -319,13 +319,12 @@ static const CGFloat VENTokenFieldDefaultMaxHeight = 2000.0;//150.0;
token.didTapTokenBlock = ^{ token.didTapTokenBlock = ^{
[weakSelf didTapToken:weakToken]; [weakSelf didTapToken:weakToken];
}; };
if (_tokens.count > 1) { if (i == [self numberOfTokens] - 1) {
[token setTitleText:[NSString stringWithFormat:@"%@,", title]];
} else {
[token setTitleText:[NSString stringWithFormat:@"%@", title]]; [token setTitleText:[NSString stringWithFormat:@"%@", title]];
} else {
[token setTitleText:[NSString stringWithFormat:@"%@,", title]];
} }
token.colorScheme = [self colorSchemeForTokenAtIndex:i]; token.colorScheme = [self colorSchemeForTokenAtIndex:i];
[self.tokens addObject:token]; [self.tokens addObject:token];
if (*currentX + token.width <= self.scrollView.contentSize.width) { // token fits in current line 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; ...@@ -485,9 +484,7 @@ static const CGFloat VENTokenFieldDefaultMaxHeight = 2000.0;//150.0;
- (void)didTapToken:(VENToken *)token - (void)didTapToken:(VENToken *)token
{ {
if (_readOnly) { if (_readOnly) {
token.highlighted = YES;
[self.delegate tokenField:self didTappedTokenTwice:[self.tokens indexOfObject:token]]; [self.delegate tokenField:self didTappedTokenTwice:[self.tokens indexOfObject:token]];
token.highlighted = NO;
return; return;
} }
VENToken * tempToken = nil; VENToken * tempToken = nil;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment