Skip to content

Commit

Permalink
Merge pull request #36 from eyalc/master
Browse files Browse the repository at this point in the history
fixed retain cycle issue in layout tokens
  • Loading branch information
ayanonagon committed Nov 18, 2014
2 parents ad3a6dc + 13c4499 commit ba8a7b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion VENTokenField/VENTokenField.m
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,9 @@ - (void)layoutTokensWithCurrentX:(CGFloat *)currentX currentY:(CGFloat *)current
token.colorScheme = self.colorScheme;

__weak VENToken *weakToken = token;
__weak VENTokenField *weakSelf = self;
token.didTapTokenBlock = ^{
[self didTapToken:weakToken];
[weakSelf didTapToken:weakToken];
};

[token setTitleText:[NSString stringWithFormat:@"%@,", title]];
Expand Down

0 comments on commit ba8a7b1

Please sign in to comment.