Skip to content

Commit

Permalink
Delegate method not being called (v1.0.1)
Browse files Browse the repository at this point in the history
  • Loading branch information
rcdilorenzo committed Sep 2, 2013
1 parent 9c8d04a commit 8d09f9b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion RMSTokenView.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "RMSTokenView"
s.version = "1.0"
s.version = "1.0.1"
s.summary = "RMSTokenView is a text-field like view that handles tokens as seen in the Mail app."
s.homepage = "https://github.com/RoleModel/RMSTokenView"
s.license = { :type => 'MIT', :file => 'LICENSE' }
Expand Down
2 changes: 1 addition & 1 deletion RMSTokenView/RMSTokenConstraintManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ - (void)updateConstraintsForTokenLines:(NSArray *)tokenLines andLineView:(UIView
for (NSArray *line in tokenLines) {
for (UIView *tokenView in line) {
if (!lastView) {
[self.updatingConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-6-[tokenView]->=6-|" options:(NSLayoutFormatOptions)0 metrics:nil views:NSDictionaryOfVariableBindings(tokenView)]];
[self.updatingConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-16-[tokenView]->=6-|" options:(NSLayoutFormatOptions)0 metrics:nil views:NSDictionaryOfVariableBindings(tokenView)]];
} else {
[self.updatingConstraints addObjectsFromArray:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[lastView]-6-[tokenView]" options:(NSLayoutFormatOptions)0 metrics:nil views:NSDictionaryOfVariableBindings(tokenView, lastView)]];
}
Expand Down
4 changes: 4 additions & 0 deletions RMSTokenView/RMSTokenView.m
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ - (void)addTokenWithText:(NSString *)tokenText {
}

self.text = nil;

if ([self.tokenDelegate respondsToSelector:@selector(tokenView:didAddTokenWithText:)]) {
[self.tokenDelegate tokenView:self didAddTokenWithText:tokenText];
}

[self updateSummary];
[self resetLines];
Expand Down

0 comments on commit 8d09f9b

Please sign in to comment.