【发布时间】:2014-06-24 11:15:18
【问题描述】:
我使用此代码在我的照片库中创建了一个相册
NSString *albumName=@"iphonemaclover";
ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
[library addAssetsGroupAlbumWithName:albumName
resultBlock:^(ALAssetsGroup *group) {
NSLog(@"added album:%@", albumName);
与 我已使用此代码从服务器下载视频
-(IBAction)btnDownload:(UIView *)sender {
[DSBezelActivityView newActivityViewForView:self.view withLabel:@"DOWNLOADING..."];
NSString *albumName=@"album name";
NSURL *url = [NSURL URLWithString:@"http://www.ebookfrenzy.com/ios_book/movie/movie.mov"];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[request setDelegate:self];
[request setDownloadDestinationPath:@"/Users/seemtech/Desktop/dd/vvv.m4v"];//work fine
[ASIHTTPRequest setDefaultTimeOutSeconds:3000];
[request startAsynchronous];
}
failureBlock:^(NSError *error) {
NSLog(@"error adding album");
}];
}
-(void)requestFinished:(ASIHTTPRequest *)request
{
[[[[UIAlertView alloc] initWithTitle:@"Message"
message:@"Success!!!"
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil] autorelease] show]; [DSBezelActivityView removeViewAnimated:YES];
}
-(void)requestFailed:(ASIHTTPRequest *)request {
NSLog(@"error==%@",request.error); [DSBezelActivityView removeViewAnimated:YES];
}
我需要将视频保存在我创建的相册中。 我该怎么做?
【问题讨论】:
标签: objective-c xcode video download