Instance Method

writeImageToSavedPhotosAlbum:orientation:completionBlock:

Saves a given image to the Saved Photos album.

Declaration

- (void)writeImageToSavedPhotosAlbum:(CGImageRef)imageRef orientation:(ALAssetOrientation)orientation completionBlock:(ALAssetsLibraryWriteImageCompletionBlock)completionBlock;

Parameters

imageRef

The image to save to the Saved Photos album.

orientation

The orientation at which to save the image.

completionBlock

The block invoked after the save operation completes.

For a description of the block, see ALAssetsLibraryWriteImageCompletionBlock.

Discussion

If you want to save a UIImage object, you can use the UIImage method CGImage to get a CGImageRef, and cast the image’s imageOrientation to ALAssetOrientation.

See Also

Saving Assets

- writeVideoAtPathToSavedPhotosAlbum:completionBlock:

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

Deprecated
- videoAtPathIsCompatibleWithSavedPhotosAlbum:

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

Deprecated
- writeImageDataToSavedPhotosAlbum:metadata:completionBlock:

Writes given image data and metadata to the Photos Album.

Deprecated
- writeImageToSavedPhotosAlbum:metadata:completionBlock:

Writes a given image and metadata to the Photos Album.

Deprecated