I used SD_WebImage to show My gif, like this:
code:
UIImage *gifImg = [UIImage sd_animatedGIFWithData:[NSData dataWithContentsOfFile:imagePath]];
NSTextAttachment *atc = [[NSTextAttachment alloc] initWithData:nil ofType:nil];
atc.image = image;
NSAttributedString *textAttachmentString = [NSAttributedString attributedStringWithAttachment:atc];
[emojiText replaceCharactersInRange:range withAttributedString:textAttachmentString];
MyTextView.attributedString = emojiText;
Result: the image display on my UITextView successfully, but it dose not play, it just be static
why? how can i make this gif-image active?
(btw: with some reasons i cannot use YYkit in my project, so I must use the UITextView or UILabel) I know that imageView can play animation with an array of images. But i does not find the correct way to show an imageView in textView.
Help me~????