kpower
kpower

Reputation: 3891

iphone image saving

I can save image to iPhone (iPhone Photo Albums \ Saved Photos) with

UIImageWriteToSavedPhotosAlbum(image, onCompleteTarget, onCompleteSelector, contextInfoToCompleteSelector);

But if there any way to check, if current image was already saved (to save it only once)?

Upvotes: 0

Views: 218

Answers (1)

schaechtele
schaechtele

Reputation: 1130

If you use an unique filename for your image, you could use NSFileManager for checking, if the file already exists.

if([[NSFileManager defaultManager] fileExistsAtPath:fileName]) {
  //File exists
}
else {
  // File doesn't exist
}

Upvotes: 1

Related Questions