Quantcast
Channel: iOS Dev Diary » UIImage
Viewing all articles
Browse latest Browse all 12

How to save a UIImage to the Camera Roll in iOS

$
0
0

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.




Viewing all articles
Browse latest Browse all 12

Trending Articles