Allow Saving Images to Library

Closes: #255
Changelog-Added: Allow Saving Images to Library
This commit is contained in:
Joel Klabo
2023-01-05 13:06:36 -08:00
committed by William Casarin
parent 96741af97b
commit 61a451184b
2 changed files with 7 additions and 0 deletions

View File

@@ -49,6 +49,11 @@ struct ImageContextMenuModifier: ViewModifier {
} label: { } label: {
Label("Copy Image", systemImage: "photo.on.rectangle") Label("Copy Image", systemImage: "photo.on.rectangle")
} }
Button {
UIImageWriteToSavedPhotosAlbum(someImage, nil, nil, nil)
} label: {
Label("Save Image", systemImage: "square.and.arrow.down")
}
} }
Button { Button {
showShareSheet = true showShareSheet = true

View File

@@ -15,6 +15,8 @@
</array> </array>
</dict> </dict>
</array> </array>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>&quot;Granting Damus access to your photo library allows you to save photos.</string>
<key>LSApplicationQueriesSchemes</key> <key>LSApplicationQueriesSchemes</key>
<array> <array>
<string>river</string> <string>river</string>