Latest 0.1.1
Homepage https://github.com/rjmiller2543/RMDownloadAdapter
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.

or

From your terminal, if you have cocoapods installed – run this command

pod try RMDownloadAdapter

If you do not have cocoapods, then first install it by running this command

sudo gem install cocoapods

Requirements

Installation

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

pod "RMDownloadAdapter"

or just download/clone this repo and copy past the class files

To use, simply import into your implementation file

#import <RMDownloadAdapter/RMDownloadAdapter.h>

Create and use the RMDownloadAdapter by init, or use the sharedInstance if sharing Cache among different controllers
and calling the start download or cancel methods with an optional progress and a mandatory completion handler

RMDownloadAdapter *downloadAdapter = [[RMDownloadAdapter alloc] init];

NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];

RMDownloadAdapterCompletionBlock completionBlock = ^(id object, NSError *error) {
    imageView.image = object;
};

[downloadAdapter startDownloadWithURLString:@"https://i.redd.it/2tm3btii5g0y.jpg" withClass:[UIImage class] indexPath:indexPath progressBlock:nil completionBlock:completionBlock];

or

NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];

RMDownloadAdapterCompletionBlock completionBlock = ^(id object, NSError *error) {
    imageView.image = object;
};

[[RMDownloadAdapter sharedInstance] startDownloadWithURLString:@"https://i.redd.it/2tm3btii5g0y.jpg" withClass:[UIImage class] indexPath:indexPath progressBlock:nil completionBlock:completionBlock];

Author

rjmiller2543, MBA11

License

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

Latest podspec

{
    "name": "RMDownloadAdapter",
    "version": "0.1.1",
    "summary": "Object and Data async downloader with progress and completion handler",
    "description": "Async Object Downloader using URL - converted to ObjC object or returning NSData.  Easy to use and includes cache with a user set size.  Concurrent downloads are allowed and cancelling one won't cancel the other.  Example Project included for some help, and Unit Tests are included as well'",
    "homepage": "https://github.com/rjmiller2543/RMDownloadAdapter",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "rjmiller2543": "MBA11"
    },
    "source": {
        "git": "https://github.com/rjmiller2543/RMDownloadAdapter.git",
        "tag": "0.1.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "RMDownloadAdapter/Classes/**/*"
}

Pin It on Pinterest

Share This