Replies: 1 comment 3 replies
-
Not 100% sure if this meets your need, but how about: struct ContentView: View {
@State private var loadedImage: UIImage?
var body: some View {
KFImage(.init(string: "https://onevcat.com/assets/images/avatar.jpg"))
.onSuccess {
loadedImage = $0.image
}
if let loadedImage {
ChildView(image: .init(uiImage: loadedImage))
}
}
}
struct ChildView: View {
let image: Image
var body: some View {
ShareLink("Share Me", item: image, preview: SharePreview("Preview", image: image))
}
} |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a KFImage passed to a child view
from the child view I want to access the underlying UIImage , so I can use it with SharkLink api
But I cannot figure out how.
Thanks for any help
Beta Was this translation helpful? Give feedback.
All reactions