Skip to content

Commit

Permalink
fix #118: Fix for NSTextAttachment
Browse files Browse the repository at this point in the history
  • Loading branch information
malcommac committed Jul 7, 2020
1 parent ec8dd4e commit 38a4b3c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ public extension AttributedString {
attachment.image = image.withRenderingMode(.alwaysOriginal)
}
} else {
attachment = NSTextAttachment(data: image.pngData()!, ofType: "png")
// It does not work on iOS12, return empty set.s
// attachment = NSTextAttachment(data: image.pngData()!, ofType: "png")
attachment = NSTextAttachment()
attachment.image = image.withRenderingMode(.alwaysOriginal)
}
#endif

Expand Down

0 comments on commit 38a4b3c

Please sign in to comment.