我的 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];
}];
对此有何建议?使用校验和?