mcd

MCDownloader

A simple and powerful iOS downloader.

Showing:

Popularity

Downloads/wk

0

GitHub Stars

164

Maintenance

Last Commit

4yrs ago

Contributors

3

Package

Dependencies

0

License

MIT

Categories

Readme

MCDownloader

A simple and powerful iOS downloader. 中文简介

Installation

Copy the source file to your project.

Usage

Start the download

[[MCDownloader sharedDownloader] downloadDataWithURL:[NSURL URLWithString:url] progress:^(NSInteger receivedSize, NSInteger expectedSize, NSInteger speed, NSURL * _Nullable targetURL) {
                
            } completed:^(MCDownloadReceipt * _Nullable receipt, NSError * _Nullable error, BOOL finished) {
                NSLog(@"==%@", error.description);
            }];
            

Stop the download

[[MCDownloader sharedDownloader] cancel:receipt completed:^{
            [self.button setTitle:@"Start" forState:UIControlStateNormal];
        }];

Remove the download

[[MCDownloader sharedDownloader] remove:receipt completed:^{
            [self.tableView reloadData];
        }];
      

Get the download information

MCDownloadReceipt *receipt = [[MCDownloader sharedDownloader] downloadReceiptForURLString:url];

Cancel and remove all downloads

[[MCDownloader sharedDownloader] cancelAllDownloads];

[[MCDownloader sharedDownloader] removeAndClearAll];

License

MCDownloader is released under an MIT license. See License.md for more information.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100