Closed olirice closed 4 years ago
I'd love to have this option, but unfortunately I found no way to get a UIImage/CGImage/CIImage from that Image, which is what I need to display on the popup bar.
What API are you using to load images from URLs?
I’ve been using Kingfisher https://github.com/onevcat/Kingfisher But could switch if there’s another approach that still supports caching and would interop better
Ah, I misunderstood. Image in swiftui is a view on top of the image asset and that asset can’t be recovered.
In that case, a signature for accepting a UIImage instead would probably be the easiest option as most of the image libs can produce one and it looks like that’s what it’s LNPopupController needs under the hood. That sound right to you?
Yes, that's very easy to add. I'll add it now, and then in the future, I can think how to allow Image
directly.
v1.0.5 out with new API. Cheers
Alright, implemented support for Image
as well. 1.0.6
There are 2 call signatures for
.popupImage
and
Which work great when the image is loaded from the file system.
Could another signature be added that directly accepts an
Image
to more easily support e.g. images loaded from URLs?