Skip to content

网络文件下载,使用NSURLSession支持断点续传

License

Notifications You must be signed in to change notification settings

LazyDuan/LDDownloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LDDownloader

网络文件下载,使用NSURLSession支持断点续传

使用方法:

[[LDDownloadManager sharedInstance] download:self.url progress:^(NSInteger receivedSize, NSInteger expectedSize, CGFloat progress) {
    dispatch_async(dispatch_get_main_queue(), ^{
        self.progressView.progress = progress;
        NSLog(@"progress==%f",progress);
    });
} state:^(FileDownloadState state) {
    dispatch_async(dispatch_get_main_queue(), ^{
        [self refreshButtonWithDownloadState:state];
    });
} completionHandler:^(NSString * _Nonnull filePath, NSError * _Nonnull error) {
    
}];

如果喜欢,请帮忙点颗星星✨

About

网络文件下载,使用NSURLSession支持断点续传

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published