0

I'm using SDWebImage to show image from url in swiftUI project

var body: some View {
    WebImage(url: URL(string: "https://nokiatech.github.io/heif/content/images/ski_jump_1440x960.heic"))
    .onSuccess { image, data, cacheType in
    }
    .resizable() // Resizable like SwiftUI.Image, you must use this modifier or the view will use the image bitmap size
    .placeholder(Image(systemName: "photo")) // Placeholder Image
    .placeholder {
        Rectangle().foregroundColor(.gray)
    }
    .indicator(.activity) // Activity Indicator
    .transition(.fade(duration: 0.5)) // Fade Transition with duration
    .scaledToFit()
    .frame(width: 300, height: 300, alignment: .center)
}

I want to save this image on long press,
How can save it to the libaray?

Kishore Suthar
  • 2,943
  • 4
  • 26
  • 44

0 Answers0