We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ec8dd4e commit 38a4b3cCopy full SHA for 38a4b3c
Sources/SwiftRichString/Extensions/AttributedString+Attachments.swift
@@ -105,7 +105,10 @@ public extension AttributedString {
105
attachment.image = image.withRenderingMode(.alwaysOriginal)
106
}
107
} else {
108
- attachment = NSTextAttachment(data: image.pngData()!, ofType: "png")
+ // It does not work on iOS12, return empty set.s
109
+ // attachment = NSTextAttachment(data: image.pngData()!, ofType: "png")
110
+ attachment = NSTextAttachment()
111
+ attachment.image = image.withRenderingMode(.alwaysOriginal)
112
113
#endif
114
0 commit comments