Reputation: 205
I use the UIImageWriteToSavedPhotosAlbum to save the photos to the album.But if the photo is too large it will take a long time to finish saving.So i need an cancel button which can cancel the saving process. But it seems that there is no way to do that.Does anyone know how to do it?
UIImage *tempImage = [[UIImage alloc] initWithContentsOfFile:pPath]; UIImageWriteToSavedPhotosAlbum(tempImage, self, @selector(finishedSavingImage:didFinishSavingWithError:contextInfo:), [file retain]);
Upvotes: 0
Views: 110
Reputation: 3215
Like you pointed out, it doesn't look like there's a documented way to cancel it. Since the saving happens in the background, do you really need a way to cancel it?
You could assume it will eventually succeed and let the user continue to do other stuff in your app right away, perhaps displaying a UIActivityIndicator somewhere in the meantime so the user knows saving is happening in the background.
Upvotes: 1