Skip to content
This repository was archived by the owner on Jan 14, 2021. It is now read-only.
This repository was archived by the owner on Jan 14, 2021. It is now read-only.

added gif into NSTextAttachment, but not animated #95

@fukemy

Description

@fukemy

hi, i loaded success gif image into my attribute string, but it can not animate, it's hard to me to know the problem

let attachment = NSTextAttachment()
                                    attachment.image = UIImage.gif(url: getEmojiUrl(name: data.Data))
                                    attachment.bounds = CGRect(x: 0, y: ((UIFont.systemFont(ofSize: 16).capHeight) - 28).rounded() / 2, width: 28, height: 28)
                                    let replacement = NSAttributedString(attachment: attachment)
                                    attributedString.replaceCharacters(in: aMatch.range, with: replacement)

Screen Shot 2020-06-11 at 15 22 08

this is sample link i loaded https://devlink.vedax.ai/images/emotions/cry.gif

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions