Skip to content

rushairer/ScreenshotableView

Repository files navigation

ScreenshotableView

Screenshotable view for SwiftUI

How to use?

@State private var sharedImage: UIImage?
@State private var shotting = false

...

// The view want to take screenshot
var content: some View {
...
}

ScreenshotableView(shotting: self.$shotting,
                   completed: { screenshot in
                   self.sharedImage = screenshot
                   self.shotting = false
}) {
    self.content
}

About

ScreenshotableView For SwiftUI

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages