Animate NSTextAttachment
-
08-10-2022 - |
문제
Is it possible to animate a NSTextAttachment
in a UITextView
?
I tried modifying its bounds but it doesn't seem to produce any effect.
NSAttributedString *attributedText = self.textView.attributedText;
NSTextAttachment *textAttachment = [attributedText attribute:NSAttachmentAttributeName atIndex:index effectiveRange:nil];
textAttachment.bounds = CGRectMake(0, 0, 1, 1);
[UIView animateWithDuration:1 animations:^{
textAttachment.bounds = CGRectMake(50, 50, 200, 200);
}];
Is this is not possible with NSTextAttachment
, what would you suggest doing to achieve a similar effect?
올바른 솔루션이 없습니다
제휴하지 않습니다 StackOverflow