Latest 1.0.0
Homepage https://github.com/ABCReading/ATDownLoader
License MIT
Platforms ios 8.0
Authors

CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

  • usage

    - (void)viewDidLoad {
      [super viewDidLoad];
    // set download URL
      self.downdURL = [NSURL URLWithString:@"https://dldir1.qq.com/qqfile/QQforMac/QQ_V6.5.1.dmg"];
    }
    
    // start download action
    - (IBAction)startAndContnue:(id)sender {
      /**
      * downLoadWithURL 
      * download success target cacheDirectory
      * fileInfo: response block, it's file info
      * success : download success block
      * fail    : download fail block
      * progress: downloading progress..
      * state   : download state
      */
      [[ATDownLoaderManager shareInstance] downLoadWithURL:self.downdURL
                                            cacheDirectory:@"QQ"
                                                  fileInfo:^(long long totalFileSize) {                                                    NSLog(@"totalFileSize==========>%lld", totalFileSize);
      } success:^(NSString *cachePath, long long totalFileSize) {
          NSLog(@"%@++++++%lld", cachePath, totalFileSize);
      } fail:^(NSString *errorMsg) {
          NSLog(@"errorMsg========%@", errorMsg);
      } progress:^(float progress) {
          NSLog(@"progress========%lf", progress);
      } state:^(ATDownLoaderState state) {
          NSLog(@"state-----------%lu", state);
      }];
    }
    
    // pause download action
    - (IBAction)pause:(id)sender {
      [[ATDownLoaderManager shareInstance] pauseWithURL:self.downdURL];
    }
    
    // cancel download action
    - (IBAction)cancel:(id)sender {
      [[ATDownLoaderManager shareInstance] cancelWithURL:self.downdURL];
    }

Requirements

Installation

ATDownLoader is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'ATDownLoader'

Author

Spaino, [email protected]

License

ATDownLoader is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "ATDownLoader",
    "version": "1.0.0",
    "summary": "ATDownLoader.",
    "description": "ATDownLoader. u4e00u4e2au901au7528u7684u65adu70b9u7eedu4f20u4e0bu8f7du5668.",
    "homepage": "https://github.com/ABCReading/ATDownLoader",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Spaino": "[email protected]"
    },
    "source": {
        "git": "https://github.com/ABCReading/ATDownLoader.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "ATDownLoader/Classes/**/*"
}

Pin It on Pinterest

Share This