Skip to content

Commit

Permalink
[Fix] nstextview image
Browse files Browse the repository at this point in the history
  • Loading branch information
zhgchgli0718 committed Mar 9, 2023
1 parent b5611cc commit 4158a60
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Sources/ZNSTextAttachment/ZResizableNSTextAttachment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ public class ZResizableNSTextAttachment: NSTextAttachment {

super.init(data: data, ofType: type)

self.attachmentCell = NSTextAttachmentCell.init(imageCell: NSImage(data: data))
#if canImport(AppKit)
self.attachmentCell = NSTextAttachmentCell.init(imageCell: NSImage(data: data))
#endif
}

required init?(coder: NSCoder) {
Expand Down
2 changes: 1 addition & 1 deletion scripts/ZNSTextAttachment.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "ZNSTextAttachment"
s.version = "1.1.5"
s.version = "1.1.6"
s.summary = "ZNSTextAttachment enables NSTextAttachment to download images from remote URLs."
s.homepage = "https://github.com/ZhgChgLi/ZNSTextAttachment"
s.license = { :type => "MIT", :file => "LICENSE" }
Expand Down

0 comments on commit 4158a60

Please sign in to comment.