Open nilekell opened 1 month ago
struct GIFViewer: NSViewRepresentable {
@Binding var url: URL
func makeNSView(context: Context) -> NSImageView {
let imageView = NSImageView(gifURL: self.url)
imageView.imageScaling = .scaleProportionallyDown
return imageView
}
func updateNSView(_ imageView: NSImageView, context: Context) {
imageView.setGifFromURL(self.url)
}
}
Does this package support MacOS/AppKit apps that use SwiftUI?
I am using the following example code and getting some errors: