Skip to content

TITokenField layoutTokensAnimated creshes the app whiling loading mail body #87

@Minakshi24

Description

@Minakshi24

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];
}
}];
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions