How to save a UIImage to the Camera Roll in iOS

The UIImage Class provides a method that can save an image straight to the Camera Roll. In this example, yourImage is a UIImage:

// super simple saving
UIImageWriteToSavedPhotosAlbum(yourImage, nil, nil, nil);

That’s short and sweet – but there’s no feedback by default, like a delegate method that informs you of how this operation went.

camera-roll

A much better option is to make use of the selector this method can call upon success or failure, like so:

This content is for members only.



Leave a Reply