Instance Method

writeImageData(toSavedPhotosAlbum:metadata:completionBlock:)

Writes given image data and metadata to the Photos Album.

Declaration

func writeImageData(toSavedPhotosAlbum imageData: Data!, metadata: [AnyHashable : Any]!, completionBlock: ALAssetsLibraryWriteImageCompletionBlock!)

Parameters

imageData

Data for the image to add to the album.

metadata

The metadata to associate with the image.

completionBlock

The block invoked after the save operation completes.

For a description of the block, see ALAssetsLibraryWriteImageCompletionBlock.

Discussion

If there is a conflict between the metadata in the image data and the metadata dictionary, the image data metadata values will be overwritten.

See Also

Saving Assets

func writeVideoAtPath(toSavedPhotosAlbum: URL!, completionBlock: ALAssetsLibraryWriteVideoCompletionBlock!)

Saves a video identified by a given URL to the Saved Photos album.

Deprecated
func videoAtPathIs(compatibleWithSavedPhotosAlbum: URL!) -> Bool

Returns a Boolean value that indicates whether a video identified by a given URL is compatible with the Saved Photos album.

Deprecated