DeckKit
DeckKit copied to clipboard
Questions about sharing
How is the sharing effect in the example picture realized? Is there any relevant code?
thx!
Hi! The sharing is done by first taking a snapshot if the view, then sharing it with a share sheet.
I think the demo app has this functionality built in, otherwise you can find both the View+Snapshot extension and the ShareSheet implementation in my SwiftUIKit library:
https://github.com/danielsaidi/SwiftUIKit
Hi again,
Closing this due to inactivity.
Just wanted to add that SwiftUI 4 now contains an ImageRenderer
that can be used to take snapshots of views. If your app supports older iOS versions, you can find a backported version in SwiftUIKit:
https://github.com/danielsaidi/SwiftUIKit