Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TITokenField layoutTokensAnimated creshes the app whiling loading mail body #87

Open
Minakshi24 opened this issue Apr 9, 2014 · 0 comments

Comments

@Minakshi24
Copy link

My app is crashing while loading mail body, it shows me BAD_ACCESS on [self sendActionsForControlEvents:TITokenFieldControlEventFrameDidChange]; this line, tried to search solution on google but didn't found any solution.

(void)layoutTokensAnimated:(BOOL)animated {

CGFloat newHeight = [self layoutTokensInternal];
if (self.bounds.size.height != newHeight){

// Animating this seems to invoke the triple-tap-delete-key-loop-problem-thing™
[UIView animateWithDuration:(animated ? 0.3 : 0) animations:^{
[self setFrame:((CGRect){self.frame.origin, {self.bounds.size.width, newHeight}})];
[self sendActionsForControlEvents:TITokenFieldControlEventFrameWillChange];

} completion:^(BOOL complete){
if (complete)
{
[self sendActionsForControlEvents:TITokenFieldControlEventFrameDidChange];
}
}];
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant