我正在使用以下代码将视频保存到我的PhotosAlbum:
ALAssetsLibrary *assetLibrary = [[ALAssetsLibrary alloc] init];
[assetLibrary writeVideoAtPathToSavedPhotosAlbum:[NSURL URLWithString:videoPath] completionBlock:^(NSURL *assetURL, NSError *error)
{
NSError *removeError = nil;
[[NSFileManager defaultManager] removeItemAtURL:[NSURL URLWithString:videoPath] error:&removeError];
});
视频转到文件夹视频,但我希望它转到带有应用名称的特定文件夹。我怎么能做到这一点?
答案 0 :(得分:0)
ALAssetsLibrary* assetLibrary = [[ALAssetsLibrary alloc] init];
[assetLibrary writeVideoAtPathToSavedPhotosAlbum:[NSURL URLWithString:@""] completionBlock:^(NSURL *assetURL, NSError *error) {
[assetLibrary addAssetURL:[NSURL URLWithString:@""] toAlbum:@"" completion:^(NSURL *assetURL, NSError *error) {
NSError* removeError = nil;
[[NSFileManager defaultManager] removeItemAtURL:[NSURL URLWithString:@""] error:&removeError];
} failure:^(NSError *error) {
NSLog(@"%@", error);
}];
}];