0

我的 iOS 应用程序中有一个功能。用户可以选择将照片或视频保存到 iPhoto 应用程序。当用户按下“保存”按钮时,它会再次保存照片或视频。有没有办法覆盖现有文件而不是再次保存它。

     [self writeVideoAtPathToSavedPhotosAlbum:url completionBlock:^(NSURL* assetURL, NSError* error)  {
                       //error handling
                       if (error!=nil) {
                           completionBlock(error);
                           return;
                       }

                       //add the asset to the custom photo album
                       [self addAssetURL: assetURL
                     withCompletionBlock:completionBlock];

                   }];

对此有何建议?使用校验和?

4

1 回答 1

0

看起来你不能,要么在单击一次后禁用“保存”按钮,要么保存到文档目录并执行校验和算法。请检查此答案检查图像是否存在

于 2014-09-12T00:16:06.077 回答