Image Loader for iOS.
This project aims to provide a reusable instrument for asynchronous image loading, caching and displaying.
CocoaPods is the recommended way to add DLImageLoader to your project.
- Add a pod entry for DLImageLoader to your Podfile
pod 'DLImageLoader', '~> 2.0.0'
- Install the pod(s) by running
pod install
. - Include DLImageLoader wherever you need it with
#import "DLIL.h"
.
Alternatively you can directly add the DLImageLoader
folder to your project.
- Download the latest code version or add the repository as a git submodule to your git-tracked project.
- Open your project in Xcode, then drag and drop
DLImageLoader
folder onto your project (use the "Product Navigator view"). Make sure to select Copy items when asked if you extracted the code archive outside of your project. - Include DLImageLoader wherever you need it with
#import "DLIL.h"
(e.g. SomeViewController.m or AppName-Prefix.pch).
[[DLImageLoader sharedInstance] displayImageFromUrl:@"image_url_here" imageView:@"UIImageView here"];
// === Two possible variants === //
[[DLImageLoader sharedInstance] loadImageFromUrl:@"image_url_here" completed:^(NSError *error, UIImage *image) { if (error == nil) { // if we have no any errors } else { // if we got an error when load an image } }];
[[DLImageLoader sharedInstance] loadDataFromUrl:@"file_url_here" completed:^(NSError *error, NSData *data) { // do anything you want }];
Nootri The Nutrition Manager | Plusarium | Naomuseum | Aerobia | StreetForm
If you use DLImageLoader code in your application you should inform the author about it ( email: andrey.lunevich[at]gmail[dot]com ) like this:
Subject: DLIL usage notification
Text: I use DLImageLoader in <application_name> - http://link_to_app_store. I [allow | don't >allow] to mention my app in section "Applications using DLImageLoader" on GitHub.
Also I'll be grateful if you mention DLIL in application UI with string "Using DLImageLoader (c) 2013-2014, Andrey Lunevich" (e.g. in some "About" section).
Copyright 2013-2014 Andrey Lunevich
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.