TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by David Martin.
This library is a simple queued downloader written in Objective-C and released under MIT License, so feel free to use and PullRequest any bug fix or new behaviour added.
Download the source code, clone it or submodule it. Everything you need is under "Croissant" folder. Drag & Drop it to your project to start working with this tasty code.
This library provides 2 basic types download. This creates a queue to avoid performance issues when downloading too many resources at the same time.
[Croissant setMaxDownloads:10];
NSURL *url = [NSURL URLWithString:@"<YOUR_RESOURCE_URL_STRING>"];
[Croissant downloadNSDDataFromURL:url
cachePolicy:CroissantCachePolicy_NoUseCache
completion:^(NSData *data, NSError *error) {
if(error)
{
// Something bad happened with your download
}
else
{
// data is ready
}
}];
NSURL *url = [NSURL URLWithString:@"<YOUR_RESOURCE_URL_STRING>"];
[Croissant downloadUIImageFromURL:url
cachePolicy:CroissantCachePolicy_NoUseCache
completion:^(UIImage *image, NSError *error) {
if(error)
{
// Something bad happened with your download
}
else
{
// image is ready
}
}];
This library is released under MIT License