Add list items example

This commit is contained in:
Roman Efimov
2013-04-02 10:02:19 -05:00
parent 573158aef2
commit f7e5b0891d
127 changed files with 22997 additions and 44 deletions

View File

@@ -0,0 +1,2 @@
platform :ios, '5.0'
pod 'SDWebImage'

View File

@@ -0,0 +1,14 @@
PODS:
- SDWebImage (3.2):
- SDWebImage/MapKit (= 3.2)
- SDWebImage/MapKit (3.2)
DEPENDENCIES:
- SDWebImage
SPEC CHECKSUMS:
SDWebImage: 8082fe8d658ccafaaecd9e5ecda12ed01f09ba9c
SDWebImage/MapKit: 8082fe8d658ccafaaecd9e5ecda12ed01f09ba9c
COCOAPODS: 0.16.4

View File

@@ -0,0 +1 @@
../../SDWebImage/SDWebImage/MKAnnotationView+WebCache.h

View File

@@ -0,0 +1 @@
../../SDWebImage/SDWebImage/SDImageCache.h

View File

@@ -0,0 +1 @@
../../SDWebImage/SDWebImage/SDWebImageCompat.h

View File

@@ -0,0 +1 @@
../../SDWebImage/SDWebImage/SDWebImageDecoder.h

View File

@@ -0,0 +1 @@
../../SDWebImage/SDWebImage/SDWebImageDownloader.h

View File

@@ -0,0 +1 @@
../../SDWebImage/SDWebImage/SDWebImageDownloaderOperation.h

View File

@@ -0,0 +1 @@
../../SDWebImage/SDWebImage/SDWebImageManager.h

View File

@@ -0,0 +1 @@
../../SDWebImage/SDWebImage/SDWebImageOperation.h

View File

@@ -0,0 +1 @@
../../SDWebImage/SDWebImage/SDWebImagePrefetcher.h

View File

@@ -0,0 +1 @@
../../SDWebImage/SDWebImage/UIButton+WebCache.h

View File

@@ -0,0 +1 @@
../../SDWebImage/SDWebImage/UIImageView+WebCache.h

View File

@@ -0,0 +1,4 @@
Documentation set was installed to Xcode!
Path: /Users/roman/Library/Developer/Shared/Documentation/DocSets/org.cocoapods.SDWebImage-3.2.docset
Time: 2013-04-02 14:39:57 +0000

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleIdentifier</key>
<string>org.cocoapods.SDWebImage-3.2</string>
<key>CFBundleName</key>
<string>SDWebImage 3.2 Documentation</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>DocSetDescription</key>
<string>This library provides a category for UIImageVIew with support for remote images coming from the web. It provides an UIImageView category adding web image and cache management to the Cocoa Touch framework, an asynchronous image downloader, an asynchronous memory + disk image caching with automatic cache expiration handling, a guarantee that the same URL won&apos;t be downloaded several times, a guarantee that bogus URLs won&apos;t be retried again and again, and performances!</string>
<key>DocSetFeedName</key>
<string>SDWebImage 3.2 Documentation</string>
<key>DocSetMinimumXcodeVersion</key>
<string>3.0</string>
<key>DashDocSetFamily</key>
<string>appledoc</string>
<key>DocSetPublisherIdentifier</key>
<string>org.cocoapods.documentation</string>
<key>DocSetPublisherName</key>
<string>Olivier Poitrey</string>
<key>NSHumanReadableCopyright</key>
<string>Olivier Poitrey</string>
</dict>
</plist>

View File

@@ -0,0 +1,754 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
<title>MKAnnotationView(WebCache) Category Reference</title>
<meta id="xcode-display" name="xcode-display" content="render"/>
<meta name="viewport" content="width=550" />
<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
<meta name="generator" content="appledoc 2.1 (build 840)" />
</head>
<body>
<header id="top_header">
<div id="library" class="hideInXcode">
<h1><a id="libraryTitle" href="../index.html">SDWebImage 3.2 </a></h1>
<a id="developerHome" href="../index.html">Olivier Poitrey</a>
</div>
<div id="title" role="banner">
<h1 class="hideInXcode">MKAnnotationView(WebCache) Category Reference</h1>
</div>
<ul id="headerButtons" role="toolbar">
<li id="toc_button">
<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
</li>
<li id="jumpto_button" role="navigation">
<select id="jumpTo">
<option value="top">Jump To&#133;</option>
<option value="overview">Overview</option>
<option value="tasks">Tasks</option>
<option value="instance_methods">Instance Methods</option>
<option value="//api/name/cancelCurrentImageLoad">&nbsp;&nbsp;&nbsp;&nbsp;- cancelCurrentImageLoad</option>
<option value="//api/name/setImageWithURL:">&nbsp;&nbsp;&nbsp;&nbsp;- setImageWithURL:</option>
<option value="//api/name/setImageWithURL:completed:">&nbsp;&nbsp;&nbsp;&nbsp;- setImageWithURL:completed:</option>
<option value="//api/name/setImageWithURL:placeholderImage:">&nbsp;&nbsp;&nbsp;&nbsp;- setImageWithURL:placeholderImage:</option>
<option value="//api/name/setImageWithURL:placeholderImage:completed:">&nbsp;&nbsp;&nbsp;&nbsp;- setImageWithURL:placeholderImage:completed:</option>
<option value="//api/name/setImageWithURL:placeholderImage:options:">&nbsp;&nbsp;&nbsp;&nbsp;- setImageWithURL:placeholderImage:options:</option>
<option value="//api/name/setImageWithURL:placeholderImage:options:completed:">&nbsp;&nbsp;&nbsp;&nbsp;- setImageWithURL:placeholderImage:options:completed:</option>
</select>
</li>
</ul>
</header>
<nav id="tocContainer" class="isShowingTOC">
<ul id="toc" role="tree">
<li role="treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#overview">Overview</a></span></li>
<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#instance_methods">Instance Methods</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/cancelCurrentImageLoad">cancelCurrentImageLoad</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setImageWithURL:">setImageWithURL:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setImageWithURL:completed:">setImageWithURL:completed:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setImageWithURL:placeholderImage:">setImageWithURL:placeholderImage:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setImageWithURL:placeholderImage:completed:">setImageWithURL:placeholderImage:completed:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setImageWithURL:placeholderImage:options:">setImageWithURL:placeholderImage:options:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setImageWithURL:placeholderImage:options:completed:">setImageWithURL:placeholderImage:options:completed:</a></span></li>
</ul></li>
</ul>
</nav>
<article>
<div id="contents" class="isShowingTOC" role="main">
<a title="MKAnnotationView(WebCache) Category Reference" name="top"></a>
<div class="main-navigation navigation-top">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="header">
<div class="section-header">
<h1 class="title title-header">MKAnnotationView(WebCache) Category Reference</h1>
</div>
</div>
<div id="container">
<div class="section section-specification"><table cellspacing="0"><tbody>
<tr>
<td class="specification-title">Declared in</td>
<td class="specification-value">MKAnnotationView+WebCache.h</td>
</tr>
</tbody></table></div>
<div class="section section-overview">
<a title="Overview" name="overview"></a>
<h2 class="subtitle subtitle-overview">Overview</h2>
<p>Integrates SDWebImage async downloading and caching of remote images with MKAnnotationView.</p>
</div>
<div class="section section-tasks">
<a title="Tasks" name="tasks"></a>
<h2 class="subtitle subtitle-tasks">Tasks</h2>
<ul class="task-list">
<li>
<span class="tooltip">
<code><a href="#//api/name/setImageWithURL:">&ndash;&nbsp;setImageWithURL:</a></code>
<span class="tooltip"><p>Set the imageView <code>image</code> with an <code>url</code>.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/setImageWithURL:placeholderImage:">&ndash;&nbsp;setImageWithURL:placeholderImage:</a></code>
<span class="tooltip"><p>Set the imageView <code>image</code> with an <code>url</code> and a placeholder.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/setImageWithURL:placeholderImage:options:">&ndash;&nbsp;setImageWithURL:placeholderImage:options:</a></code>
<span class="tooltip"><p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/setImageWithURL:completed:">&ndash;&nbsp;setImageWithURL:completed:</a></code>
<span class="tooltip"><p>Set the imageView <code>image</code> with an <code>url</code>.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/setImageWithURL:placeholderImage:completed:">&ndash;&nbsp;setImageWithURL:placeholderImage:completed:</a></code>
<span class="tooltip"><p>Set the imageView <code>image</code> with an <code>url</code>, placeholder.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/setImageWithURL:placeholderImage:options:completed:">&ndash;&nbsp;setImageWithURL:placeholderImage:options:completed:</a></code>
<span class="tooltip"><p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/cancelCurrentImageLoad">&ndash;&nbsp;cancelCurrentImageLoad</a></code>
<span class="tooltip"><p>Cancel the current download</p></span>
</span>
</li>
</ul>
</div>
<div class="section section-methods">
<a title="Instance Methods" name="instance_methods"></a>
<h2 class="subtitle subtitle-methods">Instance Methods</h2>
<div class="section-method">
<a name="//api/name/cancelCurrentImageLoad" title="cancelCurrentImageLoad"></a>
<h3 class="subsubtitle method-title">cancelCurrentImageLoad</h3>
<div class="method-subsection brief-description">
<p>Cancel the current download</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)cancelCurrentImageLoad</code></div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Cancel the current download</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">MKAnnotationView+WebCache.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/setImageWithURL:" title="setImageWithURL:"></a>
<h3 class="subsubtitle method-title">setImageWithURL:</h3>
<div class="method-subsection brief-description">
<p>Set the imageView <code>image</code> with an <code>url</code>.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setImageWithURL:(NSURL *)<em>url</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The url for the image.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Set the imageView <code>image</code> with an <code>url</code>.</p>
<p>The downloand is asynchronous and cached.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">MKAnnotationView+WebCache.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/setImageWithURL:completed:" title="setImageWithURL:completed:"></a>
<h3 class="subsubtitle method-title">setImageWithURL:completed:</h3>
<div class="method-subsection brief-description">
<p>Set the imageView <code>image</code> with an <code>url</code>.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setImageWithURL:(NSURL *)<em>url</em> completed:(SDWebImageCompletedBlock)<em>completedBlock</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The url for the image.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>completedBlock</em></dt>
<dd><p>A block called when operation has been completed. This block as no return value
and takes the requested UIImage as first parameter. In case of error the image parameter
is nil and the second parameter may contain an NSError. The third parameter is a Boolean
indicating if the image was retrived from the local cache of from the network.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Set the imageView <code>image</code> with an <code>url</code>.</p>
<p>The downloand is asynchronous and cached.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">MKAnnotationView+WebCache.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/setImageWithURL:placeholderImage:" title="setImageWithURL:placeholderImage:"></a>
<h3 class="subsubtitle method-title">setImageWithURL:placeholderImage:</h3>
<div class="method-subsection brief-description">
<p>Set the imageView <code>image</code> with an <code>url</code> and a placeholder.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setImageWithURL:(NSURL *)<em>url</em> placeholderImage:(UIImage *)<em>placeholder</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The url for the image.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>placeholder</em></dt>
<dd><p>The image to be set initially, until the image request finishes.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Set the imageView <code>image</code> with an <code>url</code> and a placeholder.</p>
<p>The downloand is asynchronous and cached.</p>
</div>
<div class="method-subsection see-also-section">
<h4 class="method-subtitle">See Also</h4>
<ul>
<li><code><p><a href="#//api/name/setImageWithURL:placeholderImage:options:">&ndash; setImageWithURL:placeholderImage:options:</a></p></code></li>
</ul>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">MKAnnotationView+WebCache.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/setImageWithURL:placeholderImage:completed:" title="setImageWithURL:placeholderImage:completed:"></a>
<h3 class="subsubtitle method-title">setImageWithURL:placeholderImage:completed:</h3>
<div class="method-subsection brief-description">
<p>Set the imageView <code>image</code> with an <code>url</code>, placeholder.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setImageWithURL:(NSURL *)<em>url</em> placeholderImage:(UIImage *)<em>placeholder</em> completed:(SDWebImageCompletedBlock)<em>completedBlock</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The url for the image.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>placeholder</em></dt>
<dd><p>The image to be set initially, until the image request finishes.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>completedBlock</em></dt>
<dd><p>A block called when operation has been completed. This block as no return value
and takes the requested UIImage as first parameter. In case of error the image parameter
is nil and the second parameter may contain an NSError. The third parameter is a Boolean
indicating if the image was retrived from the local cache of from the network.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Set the imageView <code>image</code> with an <code>url</code>, placeholder.</p>
<p>The downloand is asynchronous and cached.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">MKAnnotationView+WebCache.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/setImageWithURL:placeholderImage:options:" title="setImageWithURL:placeholderImage:options:"></a>
<h3 class="subsubtitle method-title">setImageWithURL:placeholderImage:options:</h3>
<div class="method-subsection brief-description">
<p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setImageWithURL:(NSURL *)<em>url</em> placeholderImage:(UIImage *)<em>placeholder</em> options:(SDWebImageOptions)<em>options</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The url for the image.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>placeholder</em></dt>
<dd><p>The image to be set initially, until the image request finishes.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>options</em></dt>
<dd><p>The options to use when downloading the image. @see SDWebImageOptions for the possible values.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p>
<p>The downloand is asynchronous and cached.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">MKAnnotationView+WebCache.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/setImageWithURL:placeholderImage:options:completed:" title="setImageWithURL:placeholderImage:options:completed:"></a>
<h3 class="subsubtitle method-title">setImageWithURL:placeholderImage:options:completed:</h3>
<div class="method-subsection brief-description">
<p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setImageWithURL:(NSURL *)<em>url</em> placeholderImage:(UIImage *)<em>placeholder</em> options:(SDWebImageOptions)<em>options</em> completed:(SDWebImageCompletedBlock)<em>completedBlock</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The url for the image.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>placeholder</em></dt>
<dd><p>The image to be set initially, until the image request finishes.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>options</em></dt>
<dd><p>The options to use when downloading the image. @see SDWebImageOptions for the possible values.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>completedBlock</em></dt>
<dd><p>A block called when operation has been completed. This block as no return value
and takes the requested UIImage as first parameter. In case of error the image parameter
is nil and the second parameter may contain an NSError. The third parameter is a Boolean
indicating if the image was retrived from the local cache of from the network.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p>
<p>The downloand is asynchronous and cached.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">MKAnnotationView+WebCache.h</code><br />
</div>
</div>
</div>
</div>
<div class="main-navigation navigation-bottom">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2013 Olivier Poitrey. All rights reserved. (Last updated: 2013-04-02)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.1 (build 840)</a>.</span></p>
</div>
</div>
</div>
</article>
<script type="text/javascript">
function jumpToChange()
{
window.location.hash = this.options[this.selectedIndex].value;
}
function toggleTOC()
{
var contents = document.getElementById('contents');
var tocContainer = document.getElementById('tocContainer');
if (this.getAttribute('class') == 'open')
{
this.setAttribute('class', '');
contents.setAttribute('class', '');
tocContainer.setAttribute('class', '');
window.name = "hideTOC";
}
else
{
this.setAttribute('class', 'open');
contents.setAttribute('class', 'isShowingTOC');
tocContainer.setAttribute('class', 'isShowingTOC');
window.name = "";
}
return false;
}
function toggleTOCEntryChildren(e)
{
e.stopPropagation();
var currentClass = this.getAttribute('class');
if (currentClass == 'children') {
this.setAttribute('class', 'children open');
}
else if (currentClass == 'children open') {
this.setAttribute('class', 'children');
}
return false;
}
function tocEntryClick(e)
{
e.stopPropagation();
return true;
}
function init()
{
var selectElement = document.getElementById('jumpTo');
selectElement.addEventListener('change', jumpToChange, false);
var tocButton = document.getElementById('table_of_contents');
tocButton.addEventListener('click', toggleTOC, false);
var taskTreeItem = document.getElementById('task_treeitem');
if (taskTreeItem.getElementsByTagName('li').length > 0)
{
taskTreeItem.setAttribute('class', 'children');
taskTreeItem.firstChild.setAttribute('class', 'disclosure');
}
var tocList = document.getElementById('toc');
var tocEntries = tocList.getElementsByTagName('li');
for (var i = 0; i < tocEntries.length; i++) {
tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
}
var tocLinks = tocList.getElementsByTagName('a');
for (var i = 0; i < tocLinks.length; i++) {
tocLinks[i].addEventListener('click', tocEntryClick, false);
}
if (window.name == "hideTOC") {
toggleTOC.call(tocButton);
}
}
window.onload = init;
// If showing in Xcode, hide the TOC and Header
if (navigator.userAgent.match(/xcode/i)) {
document.getElementById("contents").className = "hideInXcode"
document.getElementById("tocContainer").className = "hideInXcode"
document.getElementById("top_header").className = "hideInXcode"
}
</script>
</body>
</html>

View File

@@ -0,0 +1,265 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
<title>UIImage(ForceDecode) Category Reference</title>
<meta id="xcode-display" name="xcode-display" content="render"/>
<meta name="viewport" content="width=550" />
<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
<meta name="generator" content="appledoc 2.1 (build 840)" />
</head>
<body>
<header id="top_header">
<div id="library" class="hideInXcode">
<h1><a id="libraryTitle" href="../index.html">SDWebImage 3.2 </a></h1>
<a id="developerHome" href="../index.html">Olivier Poitrey</a>
</div>
<div id="title" role="banner">
<h1 class="hideInXcode">UIImage(ForceDecode) Category Reference</h1>
</div>
<ul id="headerButtons" role="toolbar">
<li id="toc_button">
<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
</li>
<li id="jumpto_button" role="navigation">
<select id="jumpTo">
<option value="top">Jump To&#133;</option>
<option value="tasks">Tasks</option>
<option value="class_methods">Class Methods</option>
<option value="//api/name/decodedImageWithImage:">&nbsp;&nbsp;&nbsp;&nbsp;+ decodedImageWithImage:</option>
</select>
</li>
</ul>
</header>
<nav id="tocContainer" class="isShowingTOC">
<ul id="toc" role="tree">
<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#class_methods">Class Methods</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/decodedImageWithImage:">decodedImageWithImage:</a></span></li>
</ul></li>
</ul>
</nav>
<article>
<div id="contents" class="isShowingTOC" role="main">
<a title="UIImage(ForceDecode) Category Reference" name="top"></a>
<div class="main-navigation navigation-top">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="header">
<div class="section-header">
<h1 class="title title-header">UIImage(ForceDecode) Category Reference</h1>
</div>
</div>
<div id="container">
<div class="section section-specification"><table cellspacing="0"><tbody>
<tr>
<td class="specification-title">Declared in</td>
<td class="specification-value">SDWebImageDecoder.h</td>
</tr>
</tbody></table></div>
<div class="section section-tasks">
<a title="Tasks" name="tasks"></a>
<h2 class="subtitle subtitle-tasks">Tasks</h2>
<ul class="task-list">
<li>
<span class="tooltip">
<code><a href="#//api/name/decodedImageWithImage:">+&nbsp;decodedImageWithImage:</a></code>
</span>
</li>
</ul>
</div>
<div class="section section-methods">
<a title="Class Methods" name="class_methods"></a>
<h2 class="subtitle subtitle-methods">Class Methods</h2>
<div class="section-method">
<a name="//api/name/decodedImageWithImage:" title="decodedImageWithImage:"></a>
<h3 class="subsubtitle method-title">decodedImageWithImage:</h3>
<div class="method-subsection method-declaration"><code>+ (UIImage *)decodedImageWithImage:(UIImage *)<em>image</em></code></div>
</div>
</div>
</div>
<div class="main-navigation navigation-bottom">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2013 Olivier Poitrey. All rights reserved. (Last updated: 2013-04-02)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.1 (build 840)</a>.</span></p>
</div>
</div>
</div>
</article>
<script type="text/javascript">
function jumpToChange()
{
window.location.hash = this.options[this.selectedIndex].value;
}
function toggleTOC()
{
var contents = document.getElementById('contents');
var tocContainer = document.getElementById('tocContainer');
if (this.getAttribute('class') == 'open')
{
this.setAttribute('class', '');
contents.setAttribute('class', '');
tocContainer.setAttribute('class', '');
window.name = "hideTOC";
}
else
{
this.setAttribute('class', 'open');
contents.setAttribute('class', 'isShowingTOC');
tocContainer.setAttribute('class', 'isShowingTOC');
window.name = "";
}
return false;
}
function toggleTOCEntryChildren(e)
{
e.stopPropagation();
var currentClass = this.getAttribute('class');
if (currentClass == 'children') {
this.setAttribute('class', 'children open');
}
else if (currentClass == 'children open') {
this.setAttribute('class', 'children');
}
return false;
}
function tocEntryClick(e)
{
e.stopPropagation();
return true;
}
function init()
{
var selectElement = document.getElementById('jumpTo');
selectElement.addEventListener('change', jumpToChange, false);
var tocButton = document.getElementById('table_of_contents');
tocButton.addEventListener('click', toggleTOC, false);
var taskTreeItem = document.getElementById('task_treeitem');
if (taskTreeItem.getElementsByTagName('li').length > 0)
{
taskTreeItem.setAttribute('class', 'children');
taskTreeItem.firstChild.setAttribute('class', 'disclosure');
}
var tocList = document.getElementById('toc');
var tocEntries = tocList.getElementsByTagName('li');
for (var i = 0; i < tocEntries.length; i++) {
tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
}
var tocLinks = tocList.getElementsByTagName('a');
for (var i = 0; i < tocLinks.length; i++) {
tocLinks[i].addEventListener('click', tocEntryClick, false);
}
if (window.name == "hideTOC") {
toggleTOC.call(tocButton);
}
}
window.onload = init;
// If showing in Xcode, hide the TOC and Header
if (navigator.userAgent.match(/xcode/i)) {
document.getElementById("contents").className = "hideInXcode"
document.getElementById("tocContainer").className = "hideInXcode"
document.getElementById("top_header").className = "hideInXcode"
}
</script>
</body>
</html>

View File

@@ -0,0 +1,870 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
<title>UIImageView(WebCache) Category Reference</title>
<meta id="xcode-display" name="xcode-display" content="render"/>
<meta name="viewport" content="width=550" />
<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
<meta name="generator" content="appledoc 2.1 (build 840)" />
</head>
<body>
<header id="top_header">
<div id="library" class="hideInXcode">
<h1><a id="libraryTitle" href="../index.html">SDWebImage 3.2 </a></h1>
<a id="developerHome" href="../index.html">Olivier Poitrey</a>
</div>
<div id="title" role="banner">
<h1 class="hideInXcode">UIImageView(WebCache) Category Reference</h1>
</div>
<ul id="headerButtons" role="toolbar">
<li id="toc_button">
<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
</li>
<li id="jumpto_button" role="navigation">
<select id="jumpTo">
<option value="top">Jump To&#133;</option>
<option value="overview">Overview</option>
<option value="tasks">Tasks</option>
<option value="instance_methods">Instance Methods</option>
<option value="//api/name/cancelCurrentImageLoad">&nbsp;&nbsp;&nbsp;&nbsp;- cancelCurrentImageLoad</option>
<option value="//api/name/setImageWithURL:">&nbsp;&nbsp;&nbsp;&nbsp;- setImageWithURL:</option>
<option value="//api/name/setImageWithURL:completed:">&nbsp;&nbsp;&nbsp;&nbsp;- setImageWithURL:completed:</option>
<option value="//api/name/setImageWithURL:placeholderImage:">&nbsp;&nbsp;&nbsp;&nbsp;- setImageWithURL:placeholderImage:</option>
<option value="//api/name/setImageWithURL:placeholderImage:completed:">&nbsp;&nbsp;&nbsp;&nbsp;- setImageWithURL:placeholderImage:completed:</option>
<option value="//api/name/setImageWithURL:placeholderImage:options:">&nbsp;&nbsp;&nbsp;&nbsp;- setImageWithURL:placeholderImage:options:</option>
<option value="//api/name/setImageWithURL:placeholderImage:options:completed:">&nbsp;&nbsp;&nbsp;&nbsp;- setImageWithURL:placeholderImage:options:completed:</option>
<option value="//api/name/setImageWithURL:placeholderImage:options:progress:completed:">&nbsp;&nbsp;&nbsp;&nbsp;- setImageWithURL:placeholderImage:options:progress:completed:</option>
</select>
</li>
</ul>
</header>
<nav id="tocContainer" class="isShowingTOC">
<ul id="toc" role="tree">
<li role="treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#overview">Overview</a></span></li>
<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#instance_methods">Instance Methods</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/cancelCurrentImageLoad">cancelCurrentImageLoad</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setImageWithURL:">setImageWithURL:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setImageWithURL:completed:">setImageWithURL:completed:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setImageWithURL:placeholderImage:">setImageWithURL:placeholderImage:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setImageWithURL:placeholderImage:completed:">setImageWithURL:placeholderImage:completed:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setImageWithURL:placeholderImage:options:">setImageWithURL:placeholderImage:options:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setImageWithURL:placeholderImage:options:completed:">setImageWithURL:placeholderImage:options:completed:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setImageWithURL:placeholderImage:options:progress:completed:">setImageWithURL:placeholderImage:options:progress:completed:</a></span></li>
</ul></li>
</ul>
</nav>
<article>
<div id="contents" class="isShowingTOC" role="main">
<a title="UIImageView(WebCache) Category Reference" name="top"></a>
<div class="main-navigation navigation-top">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="header">
<div class="section-header">
<h1 class="title title-header">UIImageView(WebCache) Category Reference</h1>
</div>
</div>
<div id="container">
<div class="section section-specification"><table cellspacing="0"><tbody>
<tr>
<td class="specification-title">Declared in</td>
<td class="specification-value">UIImageView+WebCache.h</td>
</tr>
</tbody></table></div>
<div class="section section-overview">
<a title="Overview" name="overview"></a>
<h2 class="subtitle subtitle-overview">Overview</h2>
<p>Integrates SDWebImage async downloading and caching of remote images with UIImageView.</p>
<p>Usage with a UITableViewCell sub-class:</p>
<pre><code>#import &lt;SDWebImage/UIImageView+WebCache.h&gt;
...
- (UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *MyIdentifier = @"MyIdentifier";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier];
if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
reuseIdentifier:MyIdentifier] autorelease];
}
// Here we use the provided setImageWithURL: method to load the web image
// Ensure you use a placeholder image otherwise cells will be initialized with no image
[cell.imageView setImageWithURL:[NSURL URLWithString:@"http://example.com/image.jpg"]
placeholderImage:[UIImage imageNamed:@"placeholder"]];
cell.textLabel.text = @"My Text";
return cell;
}
</code></pre>
</div>
<div class="section section-tasks">
<a title="Tasks" name="tasks"></a>
<h2 class="subtitle subtitle-tasks">Tasks</h2>
<ul class="task-list">
<li>
<span class="tooltip">
<code><a href="#//api/name/setImageWithURL:">&ndash;&nbsp;setImageWithURL:</a></code>
<span class="tooltip"><p>Set the imageView <code>image</code> with an <code>url</code>.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/setImageWithURL:placeholderImage:">&ndash;&nbsp;setImageWithURL:placeholderImage:</a></code>
<span class="tooltip"><p>Set the imageView <code>image</code> with an <code>url</code> and a placeholder.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/setImageWithURL:placeholderImage:options:">&ndash;&nbsp;setImageWithURL:placeholderImage:options:</a></code>
<span class="tooltip"><p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/setImageWithURL:completed:">&ndash;&nbsp;setImageWithURL:completed:</a></code>
<span class="tooltip"><p>Set the imageView <code>image</code> with an <code>url</code>.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/setImageWithURL:placeholderImage:completed:">&ndash;&nbsp;setImageWithURL:placeholderImage:completed:</a></code>
<span class="tooltip"><p>Set the imageView <code>image</code> with an <code>url</code>, placeholder.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/setImageWithURL:placeholderImage:options:completed:">&ndash;&nbsp;setImageWithURL:placeholderImage:options:completed:</a></code>
<span class="tooltip"><p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/setImageWithURL:placeholderImage:options:progress:completed:">&ndash;&nbsp;setImageWithURL:placeholderImage:options:progress:completed:</a></code>
<span class="tooltip"><p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/cancelCurrentImageLoad">&ndash;&nbsp;cancelCurrentImageLoad</a></code>
<span class="tooltip"><p>Cancel the current download</p></span>
</span>
</li>
</ul>
</div>
<div class="section section-methods">
<a title="Instance Methods" name="instance_methods"></a>
<h2 class="subtitle subtitle-methods">Instance Methods</h2>
<div class="section-method">
<a name="//api/name/cancelCurrentImageLoad" title="cancelCurrentImageLoad"></a>
<h3 class="subsubtitle method-title">cancelCurrentImageLoad</h3>
<div class="method-subsection brief-description">
<p>Cancel the current download</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)cancelCurrentImageLoad</code></div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Cancel the current download</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">UIImageView+WebCache.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/setImageWithURL:" title="setImageWithURL:"></a>
<h3 class="subsubtitle method-title">setImageWithURL:</h3>
<div class="method-subsection brief-description">
<p>Set the imageView <code>image</code> with an <code>url</code>.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setImageWithURL:(NSURL *)<em>url</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The url for the image.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Set the imageView <code>image</code> with an <code>url</code>.</p>
<p>The downloand is asynchronous and cached.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">UIImageView+WebCache.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/setImageWithURL:completed:" title="setImageWithURL:completed:"></a>
<h3 class="subsubtitle method-title">setImageWithURL:completed:</h3>
<div class="method-subsection brief-description">
<p>Set the imageView <code>image</code> with an <code>url</code>.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setImageWithURL:(NSURL *)<em>url</em> completed:(SDWebImageCompletedBlock)<em>completedBlock</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The url for the image.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>completedBlock</em></dt>
<dd><p>A block called when operation has been completed. This block as no return value
and takes the requested UIImage as first parameter. In case of error the image parameter
is nil and the second parameter may contain an NSError. The third parameter is a Boolean
indicating if the image was retrived from the local cache of from the network.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Set the imageView <code>image</code> with an <code>url</code>.</p>
<p>The downloand is asynchronous and cached.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">UIImageView+WebCache.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/setImageWithURL:placeholderImage:" title="setImageWithURL:placeholderImage:"></a>
<h3 class="subsubtitle method-title">setImageWithURL:placeholderImage:</h3>
<div class="method-subsection brief-description">
<p>Set the imageView <code>image</code> with an <code>url</code> and a placeholder.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setImageWithURL:(NSURL *)<em>url</em> placeholderImage:(UIImage *)<em>placeholder</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The url for the image.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>placeholder</em></dt>
<dd><p>The image to be set initially, until the image request finishes.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Set the imageView <code>image</code> with an <code>url</code> and a placeholder.</p>
<p>The downloand is asynchronous and cached.</p>
</div>
<div class="method-subsection see-also-section">
<h4 class="method-subtitle">See Also</h4>
<ul>
<li><code><p><a href="#//api/name/setImageWithURL:placeholderImage:options:">&ndash; setImageWithURL:placeholderImage:options:</a></p></code></li>
</ul>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">UIImageView+WebCache.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/setImageWithURL:placeholderImage:completed:" title="setImageWithURL:placeholderImage:completed:"></a>
<h3 class="subsubtitle method-title">setImageWithURL:placeholderImage:completed:</h3>
<div class="method-subsection brief-description">
<p>Set the imageView <code>image</code> with an <code>url</code>, placeholder.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setImageWithURL:(NSURL *)<em>url</em> placeholderImage:(UIImage *)<em>placeholder</em> completed:(SDWebImageCompletedBlock)<em>completedBlock</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The url for the image.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>placeholder</em></dt>
<dd><p>The image to be set initially, until the image request finishes.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>completedBlock</em></dt>
<dd><p>A block called when operation has been completed. This block as no return value
and takes the requested UIImage as first parameter. In case of error the image parameter
is nil and the second parameter may contain an NSError. The third parameter is a Boolean
indicating if the image was retrived from the local cache of from the network.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Set the imageView <code>image</code> with an <code>url</code>, placeholder.</p>
<p>The downloand is asynchronous and cached.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">UIImageView+WebCache.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/setImageWithURL:placeholderImage:options:" title="setImageWithURL:placeholderImage:options:"></a>
<h3 class="subsubtitle method-title">setImageWithURL:placeholderImage:options:</h3>
<div class="method-subsection brief-description">
<p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setImageWithURL:(NSURL *)<em>url</em> placeholderImage:(UIImage *)<em>placeholder</em> options:(SDWebImageOptions)<em>options</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The url for the image.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>placeholder</em></dt>
<dd><p>The image to be set initially, until the image request finishes.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>options</em></dt>
<dd><p>The options to use when downloading the image. @see SDWebImageOptions for the possible values.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p>
<p>The downloand is asynchronous and cached.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">UIImageView+WebCache.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/setImageWithURL:placeholderImage:options:completed:" title="setImageWithURL:placeholderImage:options:completed:"></a>
<h3 class="subsubtitle method-title">setImageWithURL:placeholderImage:options:completed:</h3>
<div class="method-subsection brief-description">
<p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setImageWithURL:(NSURL *)<em>url</em> placeholderImage:(UIImage *)<em>placeholder</em> options:(SDWebImageOptions)<em>options</em> completed:(SDWebImageCompletedBlock)<em>completedBlock</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The url for the image.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>placeholder</em></dt>
<dd><p>The image to be set initially, until the image request finishes.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>options</em></dt>
<dd><p>The options to use when downloading the image. @see SDWebImageOptions for the possible values.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>completedBlock</em></dt>
<dd><p>A block called when operation has been completed. This block as no return value
and takes the requested UIImage as first parameter. In case of error the image parameter
is nil and the second parameter may contain an NSError. The third parameter is a Boolean
indicating if the image was retrived from the local cache of from the network.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p>
<p>The downloand is asynchronous and cached.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">UIImageView+WebCache.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/setImageWithURL:placeholderImage:options:progress:completed:" title="setImageWithURL:placeholderImage:options:progress:completed:"></a>
<h3 class="subsubtitle method-title">setImageWithURL:placeholderImage:options:progress:completed:</h3>
<div class="method-subsection brief-description">
<p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setImageWithURL:(NSURL *)<em>url</em> placeholderImage:(UIImage *)<em>placeholder</em> options:(SDWebImageOptions)<em>options</em> progress:(SDWebImageDownloaderProgressBlock)<em>progressBlock</em> completed:(SDWebImageCompletedBlock)<em>completedBlock</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The url for the image.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>placeholder</em></dt>
<dd><p>The image to be set initially, until the image request finishes.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>options</em></dt>
<dd><p>The options to use when downloading the image. @see SDWebImageOptions for the possible values.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>progressBlock</em></dt>
<dd><p>A block called while image is downloading</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>completedBlock</em></dt>
<dd><p>A block called when operation has been completed. This block as no return value
and takes the requested UIImage as first parameter. In case of error the image parameter
is nil and the second parameter may contain an NSError. The third parameter is a Boolean
indicating if the image was retrived from the local cache of from the network.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p>
<p>The downloand is asynchronous and cached.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">UIImageView+WebCache.h</code><br />
</div>
</div>
</div>
</div>
<div class="main-navigation navigation-bottom">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2013 Olivier Poitrey. All rights reserved. (Last updated: 2013-04-02)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.1 (build 840)</a>.</span></p>
</div>
</div>
</div>
</article>
<script type="text/javascript">
function jumpToChange()
{
window.location.hash = this.options[this.selectedIndex].value;
}
function toggleTOC()
{
var contents = document.getElementById('contents');
var tocContainer = document.getElementById('tocContainer');
if (this.getAttribute('class') == 'open')
{
this.setAttribute('class', '');
contents.setAttribute('class', '');
tocContainer.setAttribute('class', '');
window.name = "hideTOC";
}
else
{
this.setAttribute('class', 'open');
contents.setAttribute('class', 'isShowingTOC');
tocContainer.setAttribute('class', 'isShowingTOC');
window.name = "";
}
return false;
}
function toggleTOCEntryChildren(e)
{
e.stopPropagation();
var currentClass = this.getAttribute('class');
if (currentClass == 'children') {
this.setAttribute('class', 'children open');
}
else if (currentClass == 'children open') {
this.setAttribute('class', 'children');
}
return false;
}
function tocEntryClick(e)
{
e.stopPropagation();
return true;
}
function init()
{
var selectElement = document.getElementById('jumpTo');
selectElement.addEventListener('change', jumpToChange, false);
var tocButton = document.getElementById('table_of_contents');
tocButton.addEventListener('click', toggleTOC, false);
var taskTreeItem = document.getElementById('task_treeitem');
if (taskTreeItem.getElementsByTagName('li').length > 0)
{
taskTreeItem.setAttribute('class', 'children');
taskTreeItem.firstChild.setAttribute('class', 'disclosure');
}
var tocList = document.getElementById('toc');
var tocEntries = tocList.getElementsByTagName('li');
for (var i = 0; i < tocEntries.length; i++) {
tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
}
var tocLinks = tocList.getElementsByTagName('a');
for (var i = 0; i < tocLinks.length; i++) {
tocLinks[i].addEventListener('click', tocEntryClick, false);
}
if (window.name == "hideTOC") {
toggleTOC.call(tocButton);
}
}
window.onload = init;
// If showing in Xcode, hide the TOC and Header
if (navigator.userAgent.match(/xcode/i)) {
document.getElementById("contents").className = "hideInXcode"
document.getElementById("tocContainer").className = "hideInXcode"
document.getElementById("top_header").className = "hideInXcode"
}
</script>
</body>
</html>

View File

@@ -0,0 +1,595 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
<title>SDWebImageDownloader Class Reference</title>
<meta id="xcode-display" name="xcode-display" content="render"/>
<meta name="viewport" content="width=550" />
<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
<meta name="generator" content="appledoc 2.1 (build 840)" />
</head>
<body>
<header id="top_header">
<div id="library" class="hideInXcode">
<h1><a id="libraryTitle" href="../index.html">SDWebImage 3.2 </a></h1>
<a id="developerHome" href="../index.html">Olivier Poitrey</a>
</div>
<div id="title" role="banner">
<h1 class="hideInXcode">SDWebImageDownloader Class Reference</h1>
</div>
<ul id="headerButtons" role="toolbar">
<li id="toc_button">
<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
</li>
<li id="jumpto_button" role="navigation">
<select id="jumpTo">
<option value="top">Jump To&#133;</option>
<option value="overview">Overview</option>
<option value="tasks">Tasks</option>
<option value="properties">Properties</option>
<option value="//api/name/maxConcurrentDownloads">&nbsp;&nbsp;&nbsp;&nbsp;maxConcurrentDownloads</option>
<option value="//api/name/queueMode">&nbsp;&nbsp;&nbsp;&nbsp;queueMode</option>
<option value="class_methods">Class Methods</option>
<option value="//api/name/sharedDownloader">&nbsp;&nbsp;&nbsp;&nbsp;+ sharedDownloader</option>
<option value="instance_methods">Instance Methods</option>
<option value="//api/name/downloadImageWithURL:options:progress:completed:">&nbsp;&nbsp;&nbsp;&nbsp;- downloadImageWithURL:options:progress:completed:</option>
<option value="//api/name/setValue:forHTTPHeaderField:">&nbsp;&nbsp;&nbsp;&nbsp;- setValue:forHTTPHeaderField:</option>
<option value="//api/name/valueForHTTPHeaderField:">&nbsp;&nbsp;&nbsp;&nbsp;- valueForHTTPHeaderField:</option>
</select>
</li>
</ul>
</header>
<nav id="tocContainer" class="isShowingTOC">
<ul id="toc" role="tree">
<li role="treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#overview">Overview</a></span></li>
<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#properties">Properties</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/maxConcurrentDownloads">maxConcurrentDownloads</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/queueMode">queueMode</a></span></li>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#class_methods">Class Methods</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/sharedDownloader">sharedDownloader</a></span></li>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#instance_methods">Instance Methods</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/downloadImageWithURL:options:progress:completed:">downloadImageWithURL:options:progress:completed:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setValue:forHTTPHeaderField:">setValue:forHTTPHeaderField:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/valueForHTTPHeaderField:">valueForHTTPHeaderField:</a></span></li>
</ul></li>
</ul>
</nav>
<article>
<div id="contents" class="isShowingTOC" role="main">
<a title="SDWebImageDownloader Class Reference" name="top"></a>
<div class="main-navigation navigation-top">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="header">
<div class="section-header">
<h1 class="title title-header">SDWebImageDownloader Class Reference</h1>
</div>
</div>
<div id="container">
<div class="section section-specification"><table cellspacing="0"><tbody>
<tr>
<td class="specification-title">Inherits from</td>
<td class="specification-value">NSObject</td>
</tr><tr>
<td class="specification-title">Declared in</td>
<td class="specification-value">SDWebImageDownloader.h</td>
</tr>
</tbody></table></div>
<div class="section section-overview">
<a title="Overview" name="overview"></a>
<h2 class="subtitle subtitle-overview">Overview</h2>
<p>Asynchronous downloader dedicated and optimized for image loading.</p>
</div>
<div class="section section-tasks">
<a title="Tasks" name="tasks"></a>
<h2 class="subtitle subtitle-tasks">Tasks</h2>
<ul class="task-list">
<li>
<span class="tooltip">
<code><a href="#//api/name/maxConcurrentDownloads">&nbsp;&nbsp;maxConcurrentDownloads</a></code>
</span>
<span class="task-item-suffix">property</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/queueMode">&nbsp;&nbsp;queueMode</a></code>
<span class="tooltip"><p>Changes download operations unqueue mode. Default value is <code>SDWebImageDownloaderFILOQueueMode</code>.</p></span>
</span>
<span class="task-item-suffix">property</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/sharedDownloader">+&nbsp;sharedDownloader</a></code>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/setValue:forHTTPHeaderField:">&ndash;&nbsp;setValue:forHTTPHeaderField:</a></code>
<span class="tooltip"><p>Set a value for a HTTP header to be appended to each download HTTP request.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/valueForHTTPHeaderField:">&ndash;&nbsp;valueForHTTPHeaderField:</a></code>
<span class="tooltip"><p>Returns the value of the specified HTTP header field.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/downloadImageWithURL:options:progress:completed:">&ndash;&nbsp;downloadImageWithURL:options:progress:completed:</a></code>
<span class="tooltip"><p>Creates a SDWebImageDownloader async downloader instance with a given URL</p></span>
</span>
</li>
</ul>
</div>
<div class="section section-methods">
<a title="Properties" name="properties"></a>
<h2 class="subtitle subtitle-methods">Properties</h2>
<div class="section-method">
<a name="//api/name/maxConcurrentDownloads" title="maxConcurrentDownloads"></a>
<h3 class="subsubtitle method-title">maxConcurrentDownloads</h3>
<div class="method-subsection method-declaration"><code>@property (assign, nonatomic) NSInteger maxConcurrentDownloads</code></div>
</div>
<div class="section-method">
<a name="//api/name/queueMode" title="queueMode"></a>
<h3 class="subsubtitle method-title">queueMode</h3>
<div class="method-subsection brief-description">
<p>Changes download operations unqueue mode. Default value is <code>SDWebImageDownloaderFILOQueueMode</code>.</p>
</div>
<div class="method-subsection method-declaration"><code>@property (assign, nonatomic) SDWebImageDownloaderQueueMode queueMode</code></div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Changes download operations unqueue mode. Default value is <code>SDWebImageDownloaderFILOQueueMode</code>.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImageDownloader.h</code><br />
</div>
</div>
</div>
<div class="section section-methods">
<a title="Class Methods" name="class_methods"></a>
<h2 class="subtitle subtitle-methods">Class Methods</h2>
<div class="section-method">
<a name="//api/name/sharedDownloader" title="sharedDownloader"></a>
<h3 class="subsubtitle method-title">sharedDownloader</h3>
<div class="method-subsection method-declaration"><code>+ (SDWebImageDownloader *)sharedDownloader</code></div>
</div>
</div>
<div class="section section-methods">
<a title="Instance Methods" name="instance_methods"></a>
<h2 class="subtitle subtitle-methods">Instance Methods</h2>
<div class="section-method">
<a name="//api/name/downloadImageWithURL:options:progress:completed:" title="downloadImageWithURL:options:progress:completed:"></a>
<h3 class="subsubtitle method-title">downloadImageWithURL:options:progress:completed:</h3>
<div class="method-subsection brief-description">
<p>Creates a SDWebImageDownloader async downloader instance with a given URL</p>
</div>
<div class="method-subsection method-declaration"><code>- (id&lt;SDWebImageOperation&gt;)downloadImageWithURL:(NSURL *)<em>url</em> options:(SDWebImageDownloaderOptions)<em>options</em> progress:(SDWebImageDownloaderProgressBlock)<em>progressBlock</em> completed:(SDWebImageDownloaderCompletedBlock)<em>completedBlock</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The URL to the image to download</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>options</em></dt>
<dd><p>The options to be used for this download</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>completed</em></dt>
<dd><p>A block called once the download is completed.
If the download succeeded, the image parameter is set, in case of error,
error parameter is set with the error. The last parameter is always YES
if SDWebImageDownloaderProgressiveDownload isn&rsquo;t use. With the
SDWebImageDownloaderProgressiveDownload option, this block is called
repeatedly with the partial image object and the finished argument set to NO
before to be called a last time with the full image and finished argument
set to YES. In case of error, the finished argument is always YES.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>progress</em></dt>
<dd><p>A block called repeatedly while the image is downloading</p></dd>
</dl>
</div>
<div class="method-subsection return">
<h4 class="method-subtitle parameter-title">Return Value</h4>
<p>A cancellable <a href="../Protocols/SDWebImageOperation.html">SDWebImageOperation</a></p>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Creates a SDWebImageDownloader async downloader instance with a given URL</p>
<p>The delegate will be informed when the image is finish downloaded or an error has happen.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImageDownloader.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/setValue:forHTTPHeaderField:" title="setValue:forHTTPHeaderField:"></a>
<h3 class="subsubtitle method-title">setValue:forHTTPHeaderField:</h3>
<div class="method-subsection brief-description">
<p>Set a value for a HTTP header to be appended to each download HTTP request.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setValue:(NSString *)<em>value</em> forHTTPHeaderField:(NSString *)<em>field</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>value</em></dt>
<dd><p>The value for the header field. Use <code>nil</code> value to remove the header.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>field</em></dt>
<dd><p>The name of the header field to set.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Set a value for a HTTP header to be appended to each download HTTP request.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImageDownloader.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/valueForHTTPHeaderField:" title="valueForHTTPHeaderField:"></a>
<h3 class="subsubtitle method-title">valueForHTTPHeaderField:</h3>
<div class="method-subsection brief-description">
<p>Returns the value of the specified HTTP header field.</p>
</div>
<div class="method-subsection method-declaration"><code>- (NSString *)valueForHTTPHeaderField:(NSString *)<em>field</em></code></div>
<div class="method-subsection return">
<h4 class="method-subtitle parameter-title">Return Value</h4>
<p>The value associated with the header field field, or <code>nil</code> if there is no corresponding header field.</p>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Returns the value of the specified HTTP header field.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImageDownloader.h</code><br />
</div>
</div>
</div>
</div>
<div class="main-navigation navigation-bottom">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2013 Olivier Poitrey. All rights reserved. (Last updated: 2013-04-02)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.1 (build 840)</a>.</span></p>
</div>
</div>
</div>
</article>
<script type="text/javascript">
function jumpToChange()
{
window.location.hash = this.options[this.selectedIndex].value;
}
function toggleTOC()
{
var contents = document.getElementById('contents');
var tocContainer = document.getElementById('tocContainer');
if (this.getAttribute('class') == 'open')
{
this.setAttribute('class', '');
contents.setAttribute('class', '');
tocContainer.setAttribute('class', '');
window.name = "hideTOC";
}
else
{
this.setAttribute('class', 'open');
contents.setAttribute('class', 'isShowingTOC');
tocContainer.setAttribute('class', 'isShowingTOC');
window.name = "";
}
return false;
}
function toggleTOCEntryChildren(e)
{
e.stopPropagation();
var currentClass = this.getAttribute('class');
if (currentClass == 'children') {
this.setAttribute('class', 'children open');
}
else if (currentClass == 'children open') {
this.setAttribute('class', 'children');
}
return false;
}
function tocEntryClick(e)
{
e.stopPropagation();
return true;
}
function init()
{
var selectElement = document.getElementById('jumpTo');
selectElement.addEventListener('change', jumpToChange, false);
var tocButton = document.getElementById('table_of_contents');
tocButton.addEventListener('click', toggleTOC, false);
var taskTreeItem = document.getElementById('task_treeitem');
if (taskTreeItem.getElementsByTagName('li').length > 0)
{
taskTreeItem.setAttribute('class', 'children');
taskTreeItem.firstChild.setAttribute('class', 'disclosure');
}
var tocList = document.getElementById('toc');
var tocEntries = tocList.getElementsByTagName('li');
for (var i = 0; i < tocEntries.length; i++) {
tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
}
var tocLinks = tocList.getElementsByTagName('a');
for (var i = 0; i < tocLinks.length; i++) {
tocLinks[i].addEventListener('click', tocEntryClick, false);
}
if (window.name == "hideTOC") {
toggleTOC.call(tocButton);
}
}
window.onload = init;
// If showing in Xcode, hide the TOC and Header
if (navigator.userAgent.match(/xcode/i)) {
document.getElementById("contents").className = "hideInXcode"
document.getElementById("tocContainer").className = "hideInXcode"
document.getElementById("top_header").className = "hideInXcode"
}
</script>
</body>
</html>

View File

@@ -0,0 +1,328 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
<title>SDWebImageDownloaderOperation Class Reference</title>
<meta id="xcode-display" name="xcode-display" content="render"/>
<meta name="viewport" content="width=550" />
<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
<meta name="generator" content="appledoc 2.1 (build 840)" />
</head>
<body>
<header id="top_header">
<div id="library" class="hideInXcode">
<h1><a id="libraryTitle" href="../index.html">SDWebImage 3.2 </a></h1>
<a id="developerHome" href="../index.html">Olivier Poitrey</a>
</div>
<div id="title" role="banner">
<h1 class="hideInXcode">SDWebImageDownloaderOperation Class Reference</h1>
</div>
<ul id="headerButtons" role="toolbar">
<li id="toc_button">
<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
</li>
<li id="jumpto_button" role="navigation">
<select id="jumpTo">
<option value="top">Jump To&#133;</option>
<option value="tasks">Tasks</option>
<option value="properties">Properties</option>
<option value="//api/name/options">&nbsp;&nbsp;&nbsp;&nbsp;options</option>
<option value="//api/name/request">&nbsp;&nbsp;&nbsp;&nbsp;request</option>
<option value="instance_methods">Instance Methods</option>
<option value="//api/name/initWithRequest:queue:options:progress:completed:cancelled:">&nbsp;&nbsp;&nbsp;&nbsp;- initWithRequest:queue:options:progress:completed:cancelled:</option>
</select>
</li>
</ul>
</header>
<nav id="tocContainer" class="isShowingTOC">
<ul id="toc" role="tree">
<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#properties">Properties</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/options">options</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/request">request</a></span></li>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#instance_methods">Instance Methods</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/initWithRequest:queue:options:progress:completed:cancelled:">initWithRequest:queue:options:progress:completed:cancelled:</a></span></li>
</ul></li>
</ul>
</nav>
<article>
<div id="contents" class="isShowingTOC" role="main">
<a title="SDWebImageDownloaderOperation Class Reference" name="top"></a>
<div class="main-navigation navigation-top">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="header">
<div class="section-header">
<h1 class="title title-header">SDWebImageDownloaderOperation Class Reference</h1>
</div>
</div>
<div id="container">
<div class="section section-specification"><table cellspacing="0"><tbody>
<tr>
<td class="specification-title">Inherits from</td>
<td class="specification-value">NSOperation</td>
</tr><tr>
<td class="specification-title">Conforms to</td>
<td class="specification-value"><a href="../Protocols/SDWebImageOperation.html">SDWebImageOperation</a></td>
</tr><tr>
<td class="specification-title">Declared in</td>
<td class="specification-value">SDWebImageDownloaderOperation.h</td>
</tr>
</tbody></table></div>
<div class="section section-tasks">
<a title="Tasks" name="tasks"></a>
<h2 class="subtitle subtitle-tasks">Tasks</h2>
<ul class="task-list">
<li>
<span class="tooltip">
<code><a href="#//api/name/request">&nbsp;&nbsp;request</a></code>
</span>
<span class="task-item-suffix">property</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/options">&nbsp;&nbsp;options</a></code>
</span>
<span class="task-item-suffix">property</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/initWithRequest:queue:options:progress:completed:cancelled:">&ndash;&nbsp;initWithRequest:queue:options:progress:completed:cancelled:</a></code>
</span>
</li>
</ul>
</div>
<div class="section section-methods">
<a title="Properties" name="properties"></a>
<h2 class="subtitle subtitle-methods">Properties</h2>
<div class="section-method">
<a name="//api/name/options" title="options"></a>
<h3 class="subsubtitle method-title">options</h3>
<div class="method-subsection method-declaration"><code>@property (assign, nonatomic, readonly) SDWebImageDownloaderOptions options</code></div>
</div>
<div class="section-method">
<a name="//api/name/request" title="request"></a>
<h3 class="subsubtitle method-title">request</h3>
<div class="method-subsection method-declaration"><code>@property (strong, nonatomic, readonly) NSURLRequest *request</code></div>
</div>
</div>
<div class="section section-methods">
<a title="Instance Methods" name="instance_methods"></a>
<h2 class="subtitle subtitle-methods">Instance Methods</h2>
<div class="section-method">
<a name="//api/name/initWithRequest:queue:options:progress:completed:cancelled:" title="initWithRequest:queue:options:progress:completed:cancelled:"></a>
<h3 class="subsubtitle method-title">initWithRequest:queue:options:progress:completed:cancelled:</h3>
<div class="method-subsection method-declaration"><code>- (id)initWithRequest:(NSURLRequest *)<em>request</em> queue:(dispatch_queue_t)<em>queue</em> options:(SDWebImageDownloaderOptions)<em>options</em> progress:(SDWebImageDownloaderProgressBlock)<em>progressBlock</em> completed:(SDWebImageDownloaderCompletedBlock)<em>completedBlock</em> cancelled:(void ( ^ ) ( ))<em>cancelBlock</em></code></div>
</div>
</div>
</div>
<div class="main-navigation navigation-bottom">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2013 Olivier Poitrey. All rights reserved. (Last updated: 2013-04-02)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.1 (build 840)</a>.</span></p>
</div>
</div>
</div>
</article>
<script type="text/javascript">
function jumpToChange()
{
window.location.hash = this.options[this.selectedIndex].value;
}
function toggleTOC()
{
var contents = document.getElementById('contents');
var tocContainer = document.getElementById('tocContainer');
if (this.getAttribute('class') == 'open')
{
this.setAttribute('class', '');
contents.setAttribute('class', '');
tocContainer.setAttribute('class', '');
window.name = "hideTOC";
}
else
{
this.setAttribute('class', 'open');
contents.setAttribute('class', 'isShowingTOC');
tocContainer.setAttribute('class', 'isShowingTOC');
window.name = "";
}
return false;
}
function toggleTOCEntryChildren(e)
{
e.stopPropagation();
var currentClass = this.getAttribute('class');
if (currentClass == 'children') {
this.setAttribute('class', 'children open');
}
else if (currentClass == 'children open') {
this.setAttribute('class', 'children');
}
return false;
}
function tocEntryClick(e)
{
e.stopPropagation();
return true;
}
function init()
{
var selectElement = document.getElementById('jumpTo');
selectElement.addEventListener('change', jumpToChange, false);
var tocButton = document.getElementById('table_of_contents');
tocButton.addEventListener('click', toggleTOC, false);
var taskTreeItem = document.getElementById('task_treeitem');
if (taskTreeItem.getElementsByTagName('li').length > 0)
{
taskTreeItem.setAttribute('class', 'children');
taskTreeItem.firstChild.setAttribute('class', 'disclosure');
}
var tocList = document.getElementById('toc');
var tocEntries = tocList.getElementsByTagName('li');
for (var i = 0; i < tocEntries.length; i++) {
tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
}
var tocLinks = tocList.getElementsByTagName('a');
for (var i = 0; i < tocLinks.length; i++) {
tocLinks[i].addEventListener('click', tocEntryClick, false);
}
if (window.name == "hideTOC") {
toggleTOC.call(tocButton);
}
}
window.onload = init;
// If showing in Xcode, hide the TOC and Header
if (navigator.userAgent.match(/xcode/i)) {
document.getElementById("contents").className = "hideInXcode"
document.getElementById("tocContainer").className = "hideInXcode"
document.getElementById("top_header").className = "hideInXcode"
}
</script>
</body>
</html>

View File

@@ -0,0 +1,692 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
<title>SDWebImageManager Class Reference</title>
<meta id="xcode-display" name="xcode-display" content="render"/>
<meta name="viewport" content="width=550" />
<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
<meta name="generator" content="appledoc 2.1 (build 840)" />
</head>
<body>
<header id="top_header">
<div id="library" class="hideInXcode">
<h1><a id="libraryTitle" href="../index.html">SDWebImage 3.2 </a></h1>
<a id="developerHome" href="../index.html">Olivier Poitrey</a>
</div>
<div id="title" role="banner">
<h1 class="hideInXcode">SDWebImageManager Class Reference</h1>
</div>
<ul id="headerButtons" role="toolbar">
<li id="toc_button">
<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
</li>
<li id="jumpto_button" role="navigation">
<select id="jumpTo">
<option value="top">Jump To&#133;</option>
<option value="overview">Overview</option>
<option value="tasks">Tasks</option>
<option value="properties">Properties</option>
<option value="//api/name/cacheKeyFilter">&nbsp;&nbsp;&nbsp;&nbsp;cacheKeyFilter</option>
<option value="//api/name/delegate">&nbsp;&nbsp;&nbsp;&nbsp;delegate</option>
<option value="//api/name/imageCache">&nbsp;&nbsp;&nbsp;&nbsp;imageCache</option>
<option value="//api/name/imageDownloader">&nbsp;&nbsp;&nbsp;&nbsp;imageDownloader</option>
<option value="class_methods">Class Methods</option>
<option value="//api/name/sharedManager">&nbsp;&nbsp;&nbsp;&nbsp;+ sharedManager</option>
<option value="instance_methods">Instance Methods</option>
<option value="//api/name/cancelAll">&nbsp;&nbsp;&nbsp;&nbsp;- cancelAll</option>
<option value="//api/name/downloadWithURL:options:progress:completed:">&nbsp;&nbsp;&nbsp;&nbsp;- downloadWithURL:options:progress:completed:</option>
<option value="//api/name/isRunning">&nbsp;&nbsp;&nbsp;&nbsp;- isRunning</option>
</select>
</li>
</ul>
</header>
<nav id="tocContainer" class="isShowingTOC">
<ul id="toc" role="tree">
<li role="treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#overview">Overview</a></span></li>
<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#properties">Properties</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/cacheKeyFilter">cacheKeyFilter</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/delegate">delegate</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/imageCache">imageCache</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/imageDownloader">imageDownloader</a></span></li>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#class_methods">Class Methods</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/sharedManager">sharedManager</a></span></li>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#instance_methods">Instance Methods</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/cancelAll">cancelAll</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/downloadWithURL:options:progress:completed:">downloadWithURL:options:progress:completed:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/isRunning">isRunning</a></span></li>
</ul></li>
</ul>
</nav>
<article>
<div id="contents" class="isShowingTOC" role="main">
<a title="SDWebImageManager Class Reference" name="top"></a>
<div class="main-navigation navigation-top">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="header">
<div class="section-header">
<h1 class="title title-header">SDWebImageManager Class Reference</h1>
</div>
</div>
<div id="container">
<div class="section section-specification"><table cellspacing="0"><tbody>
<tr>
<td class="specification-title">Inherits from</td>
<td class="specification-value">NSObject</td>
</tr><tr>
<td class="specification-title">Declared in</td>
<td class="specification-value">SDWebImageManager.h</td>
</tr>
</tbody></table></div>
<div class="section section-overview">
<a title="Overview" name="overview"></a>
<h2 class="subtitle subtitle-overview">Overview</h2>
<p>The SDWebImageManager is the class behind the UIImageView+WebCache category and likes.
It ties the asynchronous downloader (<a href="../Classes/SDWebImageDownloader.html">SDWebImageDownloader</a>) with the image cache store (<a href="../Classes/SDImageCache.html">SDImageCache</a>).
You can use this class directly to benefit from web image downloading with caching in another context than
a UIView.</p>
<p>Here is a simple example of how to use SDWebImageManager:</p>
<p>SDWebImageManager <em>manager = <a href="#//api/name/sharedManager">[SDWebImageManager sharedManager]</a>;
[manager downloadWithURL:imageURL
delegate:self
options:0
progress:nil
completed:^(UIImage </em>image, NSError *error, BOOL fromCache)
{
if (image)
{
// do something with image
}
}];</p>
</div>
<div class="section section-tasks">
<a title="Tasks" name="tasks"></a>
<h2 class="subtitle subtitle-tasks">Tasks</h2>
<ul class="task-list">
<li>
<span class="tooltip">
<code><a href="#//api/name/delegate">&nbsp;&nbsp;delegate</a></code>
</span>
<span class="task-item-suffix">property</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/imageCache">&nbsp;&nbsp;imageCache</a></code>
</span>
<span class="task-item-suffix">property</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/imageDownloader">&nbsp;&nbsp;imageDownloader</a></code>
</span>
<span class="task-item-suffix">property</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/cacheKeyFilter">&nbsp;&nbsp;cacheKeyFilter</a></code>
<span class="tooltip"><p>The cache filter is a block used each time SDWebImageManager need to convert an URL into a cache key. This can
be used to remove dynamic part of an image URL.</p></span>
</span>
<span class="task-item-suffix">property</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/sharedManager">+&nbsp;sharedManager</a></code>
<span class="tooltip"><p>Returns global SDWebImageManager instance.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/downloadWithURL:options:progress:completed:">&ndash;&nbsp;downloadWithURL:options:progress:completed:</a></code>
<span class="tooltip"><p>Downloads the image at the given URL if not present in cache or return the cached version otherwise.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/cancelAll">&ndash;&nbsp;cancelAll</a></code>
<span class="tooltip"><p>Cancel all current opreations</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/isRunning">&ndash;&nbsp;isRunning</a></code>
<span class="tooltip"><p>Check one or more operations running</p></span>
</span>
</li>
</ul>
</div>
<div class="section section-methods">
<a title="Properties" name="properties"></a>
<h2 class="subtitle subtitle-methods">Properties</h2>
<div class="section-method">
<a name="//api/name/cacheKeyFilter" title="cacheKeyFilter"></a>
<h3 class="subsubtitle method-title">cacheKeyFilter</h3>
<div class="method-subsection brief-description">
<p>The cache filter is a block used each time SDWebImageManager need to convert an URL into a cache key. This can
be used to remove dynamic part of an image URL.</p>
</div>
<div class="method-subsection method-declaration"><code>@property (strong) NSString *^ ) ( NSURL *url ) cacheKeyFilter</code></div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>The cache filter is a block used each time SDWebImageManager need to convert an URL into a cache key. This can
be used to remove dynamic part of an image URL.</p>
<p>The following example sets a filter in the application delegate that will remove any query-string from the
URL before to use it as a cache key:</p>
<pre><code>[[SDWebImageManager sharedManager] setCacheKeyFilter:^(NSURL *url)
{
url = [[NSURL alloc] initWithScheme:url.scheme host:url.host path:url.path];
return [url absoluteString];
}];
</code></pre>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImageManager.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/delegate" title="delegate"></a>
<h3 class="subsubtitle method-title">delegate</h3>
<div class="method-subsection method-declaration"><code>@property (weak, nonatomic) id&lt;SDWebImageManagerDelegate&gt; delegate</code></div>
</div>
<div class="section-method">
<a name="//api/name/imageCache" title="imageCache"></a>
<h3 class="subsubtitle method-title">imageCache</h3>
<div class="method-subsection method-declaration"><code>@property (strong, nonatomic, readonly) SDImageCache *imageCache</code></div>
</div>
<div class="section-method">
<a name="//api/name/imageDownloader" title="imageDownloader"></a>
<h3 class="subsubtitle method-title">imageDownloader</h3>
<div class="method-subsection method-declaration"><code>@property (strong, nonatomic, readonly) SDWebImageDownloader *imageDownloader</code></div>
</div>
</div>
<div class="section section-methods">
<a title="Class Methods" name="class_methods"></a>
<h2 class="subtitle subtitle-methods">Class Methods</h2>
<div class="section-method">
<a name="//api/name/sharedManager" title="sharedManager"></a>
<h3 class="subsubtitle method-title">sharedManager</h3>
<div class="method-subsection brief-description">
<p>Returns global SDWebImageManager instance.</p>
</div>
<div class="method-subsection method-declaration"><code>+ (SDWebImageManager *)sharedManager</code></div>
<div class="method-subsection return">
<h4 class="method-subtitle parameter-title">Return Value</h4>
<p>SDWebImageManager shared instance</p>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Returns global SDWebImageManager instance.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImageManager.h</code><br />
</div>
</div>
</div>
<div class="section section-methods">
<a title="Instance Methods" name="instance_methods"></a>
<h2 class="subtitle subtitle-methods">Instance Methods</h2>
<div class="section-method">
<a name="//api/name/cancelAll" title="cancelAll"></a>
<h3 class="subsubtitle method-title">cancelAll</h3>
<div class="method-subsection brief-description">
<p>Cancel all current opreations</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)cancelAll</code></div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Cancel all current opreations</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImageManager.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/downloadWithURL:options:progress:completed:" title="downloadWithURL:options:progress:completed:"></a>
<h3 class="subsubtitle method-title">downloadWithURL:options:progress:completed:</h3>
<div class="method-subsection brief-description">
<p>Downloads the image at the given URL if not present in cache or return the cached version otherwise.</p>
</div>
<div class="method-subsection method-declaration"><code>- (id&lt;SDWebImageOperation&gt;)downloadWithURL:(NSURL *)<em>url</em> options:(SDWebImageOptions)<em>options</em> progress:(SDWebImageDownloaderProgressBlock)<em>progressBlock</em> completed:(SDWebImageCompletedWithFinishedBlock)<em>completedBlock</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The URL to the image</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>options</em></dt>
<dd><p>A mask to specify options to use for this request</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>progressBlock</em></dt>
<dd><p>A block called while image is downloading</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>completedBlock</em></dt>
<dd><p>A block called when operation has been completed.</p>
<p>This block as no return value and takes the requested UIImage as first parameter.
In case of error the image parameter is nil and the second parameter may contain an NSError.</p>
<p>The third parameter is a Boolean indicating if the image was retrived from the local cache
of from the network.</p>
<p>The last parameter is set to NO when the SDWebImageProgressiveDownload option is used and
the image is downloading. This block is thus called repetidly with a partial image. When
image is fully downloaded, the block is called a last time with the full image and the last
parameter set to YES.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>delegate</em></dt>
<dd><p>The <a href="#//api/name/delegate">delegate</a> object used to send result back</p></dd>
</dl>
</div>
<div class="method-subsection return">
<h4 class="method-subtitle parameter-title">Return Value</h4>
<p>Returns a cancellable NSOperation</p>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Downloads the image at the given URL if not present in cache or return the cached version otherwise.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImageManager.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/isRunning" title="isRunning"></a>
<h3 class="subsubtitle method-title">isRunning</h3>
<div class="method-subsection brief-description">
<p>Check one or more operations running</p>
</div>
<div class="method-subsection method-declaration"><code>- (BOOL)isRunning</code></div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Check one or more operations running</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImageManager.h</code><br />
</div>
</div>
</div>
</div>
<div class="main-navigation navigation-bottom">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2013 Olivier Poitrey. All rights reserved. (Last updated: 2013-04-02)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.1 (build 840)</a>.</span></p>
</div>
</div>
</div>
</article>
<script type="text/javascript">
function jumpToChange()
{
window.location.hash = this.options[this.selectedIndex].value;
}
function toggleTOC()
{
var contents = document.getElementById('contents');
var tocContainer = document.getElementById('tocContainer');
if (this.getAttribute('class') == 'open')
{
this.setAttribute('class', '');
contents.setAttribute('class', '');
tocContainer.setAttribute('class', '');
window.name = "hideTOC";
}
else
{
this.setAttribute('class', 'open');
contents.setAttribute('class', 'isShowingTOC');
tocContainer.setAttribute('class', 'isShowingTOC');
window.name = "";
}
return false;
}
function toggleTOCEntryChildren(e)
{
e.stopPropagation();
var currentClass = this.getAttribute('class');
if (currentClass == 'children') {
this.setAttribute('class', 'children open');
}
else if (currentClass == 'children open') {
this.setAttribute('class', 'children');
}
return false;
}
function tocEntryClick(e)
{
e.stopPropagation();
return true;
}
function init()
{
var selectElement = document.getElementById('jumpTo');
selectElement.addEventListener('change', jumpToChange, false);
var tocButton = document.getElementById('table_of_contents');
tocButton.addEventListener('click', toggleTOC, false);
var taskTreeItem = document.getElementById('task_treeitem');
if (taskTreeItem.getElementsByTagName('li').length > 0)
{
taskTreeItem.setAttribute('class', 'children');
taskTreeItem.firstChild.setAttribute('class', 'disclosure');
}
var tocList = document.getElementById('toc');
var tocEntries = tocList.getElementsByTagName('li');
for (var i = 0; i < tocEntries.length; i++) {
tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
}
var tocLinks = tocList.getElementsByTagName('a');
for (var i = 0; i < tocLinks.length; i++) {
tocLinks[i].addEventListener('click', tocEntryClick, false);
}
if (window.name == "hideTOC") {
toggleTOC.call(tocButton);
}
}
window.onload = init;
// If showing in Xcode, hide the TOC and Header
if (navigator.userAgent.match(/xcode/i)) {
document.getElementById("contents").className = "hideInXcode"
document.getElementById("tocContainer").className = "hideInXcode"
document.getElementById("top_header").className = "hideInXcode"
}
</script>
</body>
</html>

View File

@@ -0,0 +1,633 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
<title>SDWebImagePrefetcher Class Reference</title>
<meta id="xcode-display" name="xcode-display" content="render"/>
<meta name="viewport" content="width=550" />
<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
<meta name="generator" content="appledoc 2.1 (build 840)" />
</head>
<body>
<header id="top_header">
<div id="library" class="hideInXcode">
<h1><a id="libraryTitle" href="../index.html">SDWebImage 3.2 </a></h1>
<a id="developerHome" href="../index.html">Olivier Poitrey</a>
</div>
<div id="title" role="banner">
<h1 class="hideInXcode">SDWebImagePrefetcher Class Reference</h1>
</div>
<ul id="headerButtons" role="toolbar">
<li id="toc_button">
<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
</li>
<li id="jumpto_button" role="navigation">
<select id="jumpTo">
<option value="top">Jump To&#133;</option>
<option value="overview">Overview</option>
<option value="tasks">Tasks</option>
<option value="properties">Properties</option>
<option value="//api/name/maxConcurrentDownloads">&nbsp;&nbsp;&nbsp;&nbsp;maxConcurrentDownloads</option>
<option value="//api/name/options">&nbsp;&nbsp;&nbsp;&nbsp;options</option>
<option value="class_methods">Class Methods</option>
<option value="//api/name/sharedImagePrefetcher">&nbsp;&nbsp;&nbsp;&nbsp;+ sharedImagePrefetcher</option>
<option value="instance_methods">Instance Methods</option>
<option value="//api/name/cancelPrefetching">&nbsp;&nbsp;&nbsp;&nbsp;- cancelPrefetching</option>
<option value="//api/name/prefetchURLs:">&nbsp;&nbsp;&nbsp;&nbsp;- prefetchURLs:</option>
<option value="//api/name/prefetchURLs:completed:">&nbsp;&nbsp;&nbsp;&nbsp;- prefetchURLs:completed:</option>
</select>
</li>
</ul>
</header>
<nav id="tocContainer" class="isShowingTOC">
<ul id="toc" role="tree">
<li role="treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#overview">Overview</a></span></li>
<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#properties">Properties</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/maxConcurrentDownloads">maxConcurrentDownloads</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/options">options</a></span></li>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#class_methods">Class Methods</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/sharedImagePrefetcher">sharedImagePrefetcher</a></span></li>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#instance_methods">Instance Methods</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/cancelPrefetching">cancelPrefetching</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/prefetchURLs:">prefetchURLs:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/prefetchURLs:completed:">prefetchURLs:completed:</a></span></li>
</ul></li>
</ul>
</nav>
<article>
<div id="contents" class="isShowingTOC" role="main">
<a title="SDWebImagePrefetcher Class Reference" name="top"></a>
<div class="main-navigation navigation-top">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="header">
<div class="section-header">
<h1 class="title title-header">SDWebImagePrefetcher Class Reference</h1>
</div>
</div>
<div id="container">
<div class="section section-specification"><table cellspacing="0"><tbody>
<tr>
<td class="specification-title">Inherits from</td>
<td class="specification-value">NSObject</td>
</tr><tr>
<td class="specification-title">Declared in</td>
<td class="specification-value">SDWebImagePrefetcher.h</td>
</tr>
</tbody></table></div>
<div class="section section-overview">
<a title="Overview" name="overview"></a>
<h2 class="subtitle subtitle-overview">Overview</h2>
<p>Prefetch some URLs in the cache for future use. Images are downloaded in low priority.</p>
</div>
<div class="section section-tasks">
<a title="Tasks" name="tasks"></a>
<h2 class="subtitle subtitle-tasks">Tasks</h2>
<ul class="task-list">
<li>
<span class="tooltip">
<code><a href="#//api/name/maxConcurrentDownloads">&nbsp;&nbsp;maxConcurrentDownloads</a></code>
<span class="tooltip"><p>Maximum number of URLs to prefetch at the same time. Defaults to 3.</p></span>
</span>
<span class="task-item-suffix">property</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/options">&nbsp;&nbsp;options</a></code>
<span class="tooltip"><p>SDWebImageOptions for prefetcher. Defaults to SDWebImageLowPriority.</p></span>
</span>
<span class="task-item-suffix">property</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/sharedImagePrefetcher">+&nbsp;sharedImagePrefetcher</a></code>
<span class="tooltip"><p>Return the global image prefetcher instance.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/prefetchURLs:">&ndash;&nbsp;prefetchURLs:</a></code>
<span class="tooltip"><p>Assign list of URLs to let SDWebImagePrefetcher to queue the prefetching,
currently one image is downloaded at a time,
and skips images for failed downloads and proceed to the next image in the list</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/prefetchURLs:completed:">&ndash;&nbsp;prefetchURLs:completed:</a></code>
<span class="tooltip"><p>Assign list of URLs to let SDWebImagePrefetcher to queue the prefetching,
currently one image is downloaded at a time,
and skips images for failed downloads and proceed to the next image in the list</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/cancelPrefetching">&ndash;&nbsp;cancelPrefetching</a></code>
<span class="tooltip"><p>Remove and cancel queued list</p></span>
</span>
</li>
</ul>
</div>
<div class="section section-methods">
<a title="Properties" name="properties"></a>
<h2 class="subtitle subtitle-methods">Properties</h2>
<div class="section-method">
<a name="//api/name/maxConcurrentDownloads" title="maxConcurrentDownloads"></a>
<h3 class="subsubtitle method-title">maxConcurrentDownloads</h3>
<div class="method-subsection brief-description">
<p>Maximum number of URLs to prefetch at the same time. Defaults to 3.</p>
</div>
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) NSUInteger maxConcurrentDownloads</code></div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Maximum number of URLs to prefetch at the same time. Defaults to 3.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImagePrefetcher.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/options" title="options"></a>
<h3 class="subsubtitle method-title">options</h3>
<div class="method-subsection brief-description">
<p>SDWebImageOptions for prefetcher. Defaults to SDWebImageLowPriority.</p>
</div>
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) SDWebImageOptions options</code></div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>SDWebImageOptions for prefetcher. Defaults to SDWebImageLowPriority.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImagePrefetcher.h</code><br />
</div>
</div>
</div>
<div class="section section-methods">
<a title="Class Methods" name="class_methods"></a>
<h2 class="subtitle subtitle-methods">Class Methods</h2>
<div class="section-method">
<a name="//api/name/sharedImagePrefetcher" title="sharedImagePrefetcher"></a>
<h3 class="subsubtitle method-title">sharedImagePrefetcher</h3>
<div class="method-subsection brief-description">
<p>Return the global image prefetcher instance.</p>
</div>
<div class="method-subsection method-declaration"><code>+ (SDWebImagePrefetcher *)sharedImagePrefetcher</code></div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Return the global image prefetcher instance.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImagePrefetcher.h</code><br />
</div>
</div>
</div>
<div class="section section-methods">
<a title="Instance Methods" name="instance_methods"></a>
<h2 class="subtitle subtitle-methods">Instance Methods</h2>
<div class="section-method">
<a name="//api/name/cancelPrefetching" title="cancelPrefetching"></a>
<h3 class="subsubtitle method-title">cancelPrefetching</h3>
<div class="method-subsection brief-description">
<p>Remove and cancel queued list</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)cancelPrefetching</code></div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Remove and cancel queued list</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImagePrefetcher.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/prefetchURLs:" title="prefetchURLs:"></a>
<h3 class="subsubtitle method-title">prefetchURLs:</h3>
<div class="method-subsection brief-description">
<p>Assign list of URLs to let SDWebImagePrefetcher to queue the prefetching,
currently one image is downloaded at a time,
and skips images for failed downloads and proceed to the next image in the list</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)prefetchURLs:(NSArray *)<em>urls</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>urls</em></dt>
<dd><p>list of URLs to prefetch</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Assign list of URLs to let SDWebImagePrefetcher to queue the prefetching,
currently one image is downloaded at a time,
and skips images for failed downloads and proceed to the next image in the list</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImagePrefetcher.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/prefetchURLs:completed:" title="prefetchURLs:completed:"></a>
<h3 class="subsubtitle method-title">prefetchURLs:completed:</h3>
<div class="method-subsection brief-description">
<p>Assign list of URLs to let SDWebImagePrefetcher to queue the prefetching,
currently one image is downloaded at a time,
and skips images for failed downloads and proceed to the next image in the list</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)prefetchURLs:(NSArray *)<em>urls</em> completed:(void ( ^ ) ( NSUInteger finishedCount , NSUInteger skippedCount ))<em>completionBlock</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>urls</em></dt>
<dd><p>list of URLs to prefetch</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>completionBlock</em></dt>
<dd><p>block to be called when prefetching is completed</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Assign list of URLs to let SDWebImagePrefetcher to queue the prefetching,
currently one image is downloaded at a time,
and skips images for failed downloads and proceed to the next image in the list</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImagePrefetcher.h</code><br />
</div>
</div>
</div>
</div>
<div class="main-navigation navigation-bottom">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2013 Olivier Poitrey. All rights reserved. (Last updated: 2013-04-02)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.1 (build 840)</a>.</span></p>
</div>
</div>
</div>
</article>
<script type="text/javascript">
function jumpToChange()
{
window.location.hash = this.options[this.selectedIndex].value;
}
function toggleTOC()
{
var contents = document.getElementById('contents');
var tocContainer = document.getElementById('tocContainer');
if (this.getAttribute('class') == 'open')
{
this.setAttribute('class', '');
contents.setAttribute('class', '');
tocContainer.setAttribute('class', '');
window.name = "hideTOC";
}
else
{
this.setAttribute('class', 'open');
contents.setAttribute('class', 'isShowingTOC');
tocContainer.setAttribute('class', 'isShowingTOC');
window.name = "";
}
return false;
}
function toggleTOCEntryChildren(e)
{
e.stopPropagation();
var currentClass = this.getAttribute('class');
if (currentClass == 'children') {
this.setAttribute('class', 'children open');
}
else if (currentClass == 'children open') {
this.setAttribute('class', 'children');
}
return false;
}
function tocEntryClick(e)
{
e.stopPropagation();
return true;
}
function init()
{
var selectElement = document.getElementById('jumpTo');
selectElement.addEventListener('change', jumpToChange, false);
var tocButton = document.getElementById('table_of_contents');
tocButton.addEventListener('click', toggleTOC, false);
var taskTreeItem = document.getElementById('task_treeitem');
if (taskTreeItem.getElementsByTagName('li').length > 0)
{
taskTreeItem.setAttribute('class', 'children');
taskTreeItem.firstChild.setAttribute('class', 'disclosure');
}
var tocList = document.getElementById('toc');
var tocEntries = tocList.getElementsByTagName('li');
for (var i = 0; i < tocEntries.length; i++) {
tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
}
var tocLinks = tocList.getElementsByTagName('a');
for (var i = 0; i < tocLinks.length; i++) {
tocLinks[i].addEventListener('click', tocEntryClick, false);
}
if (window.name == "hideTOC") {
toggleTOC.call(tocButton);
}
}
window.onload = init;
// If showing in Xcode, hide the TOC and Header
if (navigator.userAgent.match(/xcode/i)) {
document.getElementById("contents").className = "hideInXcode"
document.getElementById("tocContainer").className = "hideInXcode"
document.getElementById("top_header").className = "hideInXcode"
}
</script>
</body>
</html>

View File

@@ -0,0 +1,415 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
<title>SDWebImageManagerDelegate Protocol Reference</title>
<meta id="xcode-display" name="xcode-display" content="render"/>
<meta name="viewport" content="width=550" />
<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
<meta name="generator" content="appledoc 2.1 (build 840)" />
</head>
<body>
<header id="top_header">
<div id="library" class="hideInXcode">
<h1><a id="libraryTitle" href="../index.html">SDWebImage 3.2 </a></h1>
<a id="developerHome" href="../index.html">Olivier Poitrey</a>
</div>
<div id="title" role="banner">
<h1 class="hideInXcode">SDWebImageManagerDelegate Protocol Reference</h1>
</div>
<ul id="headerButtons" role="toolbar">
<li id="toc_button">
<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
</li>
<li id="jumpto_button" role="navigation">
<select id="jumpTo">
<option value="top">Jump To&#133;</option>
<option value="overview">Overview</option>
<option value="tasks">Tasks</option>
<option value="instance_methods">Instance Methods</option>
<option value="//api/name/imageManager:shouldDownloadImageForURL:">&nbsp;&nbsp;&nbsp;&nbsp;- imageManager:shouldDownloadImageForURL:</option>
<option value="//api/name/imageManager:transformDownloadedImage:withURL:">&nbsp;&nbsp;&nbsp;&nbsp;- imageManager:transformDownloadedImage:withURL:</option>
</select>
</li>
</ul>
</header>
<nav id="tocContainer" class="isShowingTOC">
<ul id="toc" role="tree">
<li role="treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#overview">Overview</a></span></li>
<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#instance_methods">Instance Methods</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/imageManager:shouldDownloadImageForURL:">imageManager:shouldDownloadImageForURL:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/imageManager:transformDownloadedImage:withURL:">imageManager:transformDownloadedImage:withURL:</a></span></li>
</ul></li>
</ul>
</nav>
<article>
<div id="contents" class="isShowingTOC" role="main">
<a title="SDWebImageManagerDelegate Protocol Reference" name="top"></a>
<div class="main-navigation navigation-top">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="header">
<div class="section-header">
<h1 class="title title-header">SDWebImageManagerDelegate Protocol Reference</h1>
</div>
</div>
<div id="container">
<div class="section section-specification"><table cellspacing="0"><tbody>
<tr>
<td class="specification-title">Conforms to</td>
<td class="specification-value">NSObject</td>
</tr><tr>
<td class="specification-title">Declared in</td>
<td class="specification-value">SDWebImageManager.h</td>
</tr>
</tbody></table></div>
<div class="section section-overview">
<a title="Overview" name="overview"></a>
<h2 class="subtitle subtitle-overview">Overview</h2>
<p>Even if the image is cached, respect the HTTP response cache control, and refresh the image from remote location if needed.
The disk caching will be handled by NSURLCache instead of SDWebImage leading to slight performance degradation.
This option helps deal with images changing behind the same request URL, e.g. Facebook graph api profile pics.
If a cached image is refreshed, the completion block is called once with the cached image and again with the final image.</p>
<p>Use this flag only if you can&rsquo;t make your URLs static with embeded cache busting parameter.</p>
</div>
<div class="section section-tasks">
<a title="Tasks" name="tasks"></a>
<h2 class="subtitle subtitle-tasks">Tasks</h2>
<ul class="task-list">
<li>
<span class="tooltip">
<code><a href="#//api/name/imageManager:shouldDownloadImageForURL:">&ndash;&nbsp;imageManager:shouldDownloadImageForURL:</a></code>
<span class="tooltip"><p>Controls which image should be downloaded when the image is not found in the cache.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/imageManager:transformDownloadedImage:withURL:">&ndash;&nbsp;imageManager:transformDownloadedImage:withURL:</a></code>
<span class="tooltip"><p>Allows to transform the image immediately after it has been downloaded and just before to cache it on disk and memory.
NOTE: This method is called from a global queue in order to not to block the main thread.</p></span>
</span>
</li>
</ul>
</div>
<div class="section section-methods">
<a title="Instance Methods" name="instance_methods"></a>
<h2 class="subtitle subtitle-methods">Instance Methods</h2>
<div class="section-method">
<a name="//api/name/imageManager:shouldDownloadImageForURL:" title="imageManager:shouldDownloadImageForURL:"></a>
<h3 class="subsubtitle method-title">imageManager:shouldDownloadImageForURL:</h3>
<div class="method-subsection brief-description">
<p>Controls which image should be downloaded when the image is not found in the cache.</p>
</div>
<div class="method-subsection method-declaration"><code>- (BOOL)imageManager:(SDWebImageManager *)<em>imageManager</em> shouldDownloadImageForURL:(NSURL *)<em>imageURL</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>imageManager</em></dt>
<dd><p>The current <a href="../Classes/SDWebImageManager.html"><code>SDWebImageManager</code></a></p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>imageURL</em></dt>
<dd><p>The url of the image to be downloaded</p></dd>
</dl>
</div>
<div class="method-subsection return">
<h4 class="method-subtitle parameter-title">Return Value</h4>
<p>Return NO to prevent the downloading of the image on cache misses. If not implemented, YES is implied.</p>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Controls which image should be downloaded when the image is not found in the cache.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImageManager.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/imageManager:transformDownloadedImage:withURL:" title="imageManager:transformDownloadedImage:withURL:"></a>
<h3 class="subsubtitle method-title">imageManager:transformDownloadedImage:withURL:</h3>
<div class="method-subsection brief-description">
<p>Allows to transform the image immediately after it has been downloaded and just before to cache it on disk and memory.
NOTE: This method is called from a global queue in order to not to block the main thread.</p>
</div>
<div class="method-subsection method-declaration"><code>- (UIImage *)imageManager:(SDWebImageManager *)<em>imageManager</em> transformDownloadedImage:(UIImage *)<em>image</em> withURL:(NSURL *)<em>imageURL</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>imageManager</em></dt>
<dd><p>The current <a href="../Classes/SDWebImageManager.html"><code>SDWebImageManager</code></a></p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>image</em></dt>
<dd><p>The image to transform</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>imageURL</em></dt>
<dd><p>The url of the image to transform</p></dd>
</dl>
</div>
<div class="method-subsection return">
<h4 class="method-subtitle parameter-title">Return Value</h4>
<p>The transformed image object.</p>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Allows to transform the image immediately after it has been downloaded and just before to cache it on disk and memory.
NOTE: This method is called from a global queue in order to not to block the main thread.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImageManager.h</code><br />
</div>
</div>
</div>
</div>
<div class="main-navigation navigation-bottom">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2013 Olivier Poitrey. All rights reserved. (Last updated: 2013-04-02)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.1 (build 840)</a>.</span></p>
</div>
</div>
</div>
</article>
<script type="text/javascript">
function jumpToChange()
{
window.location.hash = this.options[this.selectedIndex].value;
}
function toggleTOC()
{
var contents = document.getElementById('contents');
var tocContainer = document.getElementById('tocContainer');
if (this.getAttribute('class') == 'open')
{
this.setAttribute('class', '');
contents.setAttribute('class', '');
tocContainer.setAttribute('class', '');
window.name = "hideTOC";
}
else
{
this.setAttribute('class', 'open');
contents.setAttribute('class', 'isShowingTOC');
tocContainer.setAttribute('class', 'isShowingTOC');
window.name = "";
}
return false;
}
function toggleTOCEntryChildren(e)
{
e.stopPropagation();
var currentClass = this.getAttribute('class');
if (currentClass == 'children') {
this.setAttribute('class', 'children open');
}
else if (currentClass == 'children open') {
this.setAttribute('class', 'children');
}
return false;
}
function tocEntryClick(e)
{
e.stopPropagation();
return true;
}
function init()
{
var selectElement = document.getElementById('jumpTo');
selectElement.addEventListener('change', jumpToChange, false);
var tocButton = document.getElementById('table_of_contents');
tocButton.addEventListener('click', toggleTOC, false);
var taskTreeItem = document.getElementById('task_treeitem');
if (taskTreeItem.getElementsByTagName('li').length > 0)
{
taskTreeItem.setAttribute('class', 'children');
taskTreeItem.firstChild.setAttribute('class', 'disclosure');
}
var tocList = document.getElementById('toc');
var tocEntries = tocList.getElementsByTagName('li');
for (var i = 0; i < tocEntries.length; i++) {
tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
}
var tocLinks = tocList.getElementsByTagName('a');
for (var i = 0; i < tocLinks.length; i++) {
tocLinks[i].addEventListener('click', tocEntryClick, false);
}
if (window.name == "hideTOC") {
toggleTOC.call(tocButton);
}
}
window.onload = init;
// If showing in Xcode, hide the TOC and Header
if (navigator.userAgent.match(/xcode/i)) {
document.getElementById("contents").className = "hideInXcode"
document.getElementById("tocContainer").className = "hideInXcode"
document.getElementById("top_header").className = "hideInXcode"
}
</script>
</body>
</html>

View File

@@ -0,0 +1,268 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
<title>SDWebImageOperation Protocol Reference</title>
<meta id="xcode-display" name="xcode-display" content="render"/>
<meta name="viewport" content="width=550" />
<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
<meta name="generator" content="appledoc 2.1 (build 840)" />
</head>
<body>
<header id="top_header">
<div id="library" class="hideInXcode">
<h1><a id="libraryTitle" href="../index.html">SDWebImage 3.2 </a></h1>
<a id="developerHome" href="../index.html">Olivier Poitrey</a>
</div>
<div id="title" role="banner">
<h1 class="hideInXcode">SDWebImageOperation Protocol Reference</h1>
</div>
<ul id="headerButtons" role="toolbar">
<li id="toc_button">
<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
</li>
<li id="jumpto_button" role="navigation">
<select id="jumpTo">
<option value="top">Jump To&#133;</option>
<option value="tasks">Tasks</option>
<option value="instance_methods">Instance Methods</option>
<option value="//api/name/cancel">&nbsp;&nbsp;&nbsp;&nbsp;- cancel</option>
</select>
</li>
</ul>
</header>
<nav id="tocContainer" class="isShowingTOC">
<ul id="toc" role="tree">
<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#instance_methods">Instance Methods</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/cancel">cancel</a></span></li>
</ul></li>
</ul>
</nav>
<article>
<div id="contents" class="isShowingTOC" role="main">
<a title="SDWebImageOperation Protocol Reference" name="top"></a>
<div class="main-navigation navigation-top">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="header">
<div class="section-header">
<h1 class="title title-header">SDWebImageOperation Protocol Reference</h1>
</div>
</div>
<div id="container">
<div class="section section-specification"><table cellspacing="0"><tbody>
<tr>
<td class="specification-title">Conforms to</td>
<td class="specification-value">NSObject</td>
</tr><tr>
<td class="specification-title">Declared in</td>
<td class="specification-value">SDWebImageOperation.h</td>
</tr>
</tbody></table></div>
<div class="section section-tasks">
<a title="Tasks" name="tasks"></a>
<h2 class="subtitle subtitle-tasks">Tasks</h2>
<ul class="task-list">
<li>
<span class="tooltip">
<code><a href="#//api/name/cancel">&ndash;&nbsp;cancel</a></code>
</span>
<span class="task-item-suffix">required method</span>
</li>
</ul>
</div>
<div class="section section-methods">
<a title="Instance Methods" name="instance_methods"></a>
<h2 class="subtitle subtitle-methods">Instance Methods</h2>
<div class="section-method">
<a name="//api/name/cancel" title="cancel"></a>
<h3 class="subsubtitle method-title">cancel</h3>
<div class="method-subsection method-declaration"><code>- (void)cancel</code></div>
</div>
</div>
</div>
<div class="main-navigation navigation-bottom">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2013 Olivier Poitrey. All rights reserved. (Last updated: 2013-04-02)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.1 (build 840)</a>.</span></p>
</div>
</div>
</div>
</article>
<script type="text/javascript">
function jumpToChange()
{
window.location.hash = this.options[this.selectedIndex].value;
}
function toggleTOC()
{
var contents = document.getElementById('contents');
var tocContainer = document.getElementById('tocContainer');
if (this.getAttribute('class') == 'open')
{
this.setAttribute('class', '');
contents.setAttribute('class', '');
tocContainer.setAttribute('class', '');
window.name = "hideTOC";
}
else
{
this.setAttribute('class', 'open');
contents.setAttribute('class', 'isShowingTOC');
tocContainer.setAttribute('class', 'isShowingTOC');
window.name = "";
}
return false;
}
function toggleTOCEntryChildren(e)
{
e.stopPropagation();
var currentClass = this.getAttribute('class');
if (currentClass == 'children') {
this.setAttribute('class', 'children open');
}
else if (currentClass == 'children open') {
this.setAttribute('class', 'children');
}
return false;
}
function tocEntryClick(e)
{
e.stopPropagation();
return true;
}
function init()
{
var selectElement = document.getElementById('jumpTo');
selectElement.addEventListener('change', jumpToChange, false);
var tocButton = document.getElementById('table_of_contents');
tocButton.addEventListener('click', toggleTOC, false);
var taskTreeItem = document.getElementById('task_treeitem');
if (taskTreeItem.getElementsByTagName('li').length > 0)
{
taskTreeItem.setAttribute('class', 'children');
taskTreeItem.firstChild.setAttribute('class', 'disclosure');
}
var tocList = document.getElementById('toc');
var tocEntries = tocList.getElementsByTagName('li');
for (var i = 0; i < tocEntries.length; i++) {
tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
}
var tocLinks = tocList.getElementsByTagName('a');
for (var i = 0; i < tocLinks.length; i++) {
tocLinks[i].addEventListener('click', tocEntryClick, false);
}
if (window.name == "hideTOC") {
toggleTOC.call(tocButton);
}
}
window.onload = init;
// If showing in Xcode, hide the TOC and Header
if (navigator.userAgent.match(/xcode/i)) {
document.getElementById("contents").className = "hideInXcode"
document.getElementById("tocContainer").className = "hideInXcode"
document.getElementById("top_header").className = "hideInXcode"
}
</script>
</body>
</html>

View File

@@ -0,0 +1,584 @@
body {
font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
font-size: 13px;
}
code {
font-family: Courier, Consolas, monospace;
font-size: 13px;
color: #666;
}
pre {
font-family: Courier, Consolas, monospace;
font-size: 13px;
line-height: 18px;
tab-interval: 0.5em;
border: 1px solid #C7CFD5;
background-color: #F1F5F9;
color: #666;
padding: 0.3em 1em;
}
ul {
list-style-type: square;
}
li {
margin-bottom: 10px;
}
a, a code {
text-decoration: none;
color: #36C;
}
a:hover, a:hover code {
text-decoration: underline;
color: #36C;
}
h2 {
border-bottom: 1px solid #8391A8;
color: #3C4C6C;
font-size: 187%;
font-weight: normal;
margin-top: 1.75em;
padding-bottom: 2px;
}
table {
margin-bottom: 4em;
border-collapse:collapse;
vertical-align: middle;
}
td {
border: 1px solid #9BB3CD;
padding: .667em;
font-size: 100%;
}
th {
border: 1px solid #9BB3CD;
padding: .3em .667em .3em .667em;
background: #93A5BB;
font-size: 103%;
font-weight: bold;
color: white;
text-align: left;
}
/* @group Common page elements */
#top_header {
height: 91px;
left: 0;
min-width: 598px;
position: absolute;
right: 0;
top: 0;
z-index: 900;
}
#footer {
clear: both;
padding-top: 20px;
text-align: center;
}
#contents, #overview_contents {
-webkit-overflow-scrolling: touch;
border-top: 1px solid #2B334F;
position: absolute;
top: 91px;
left: 0;
right: 0;
bottom: 0;
overflow-x: hidden;
overflow-y: auto;
padding-left: 2em;
padding-right: 2em;
padding-top: 1em;
min-width: 550px;
}
#contents.isShowingTOC {
left: 230px;
min-width: 320px;
}
.copyright {
font-size: 12px;
}
.generator {
font-size: 11px;
}
.main-navigation ul li {
display: inline;
margin-left: 15px;
list-style: none;
}
.navigation-top {
clear: both;
float: right;
}
.navigation-bottom {
clear: both;
float: right;
margin-top: 20px;
margin-bottom: -10px;
}
.open > .disclosure {
background-image: url("../img/disclosure_open.png");
}
.disclosure {
background: url("../img/disclosure.png") no-repeat scroll 0 0;
}
.disclosure, .nodisclosure {
display: inline-block;
height: 8px;
margin-right: 5px;
position: relative;
width: 9px;
}
/* @end */
/* @group Header */
#top_header #library {
background: url("../img/library_background.png") repeat-x 0 0 #485E78;
background-color: #ccc;
height: 35px;
font-size: 115%;
}
#top_header #library #libraryTitle {
color: #FFFFFF;
margin-left: 15px;
text-shadow: 0 -1px 0 #485E78;
top: 8px;
position: absolute;
}
#top_header #library #developerHome {
color: #92979E;
right: 15px;
top: 8px;
position: absolute;
}
#top_header #library a:hover {
text-decoration: none;
}
#top_header #title {
background: url("../img/title_background.png") repeat-x 0 0 #8A98A9;
border-bottom: 1px solid #B6B6B6;
height: 25px;
overflow: hidden;
}
#top_header h1 {
font-size: 115%;
font-weight: normal;
margin: 0;
padding: 3px 0 2px;
text-align: center;
text-shadow: 0 1px 0 #D5D5D5;
white-space: nowrap;
}
#headerButtons {
background-color: #D8D8D8;
background-image: url("../img/button_bar_background.png");
border-bottom: 1px solid #EDEDED;
border-top: 1px solid #2B334F;
font-size: 8pt;
height: 28px;
left: 0;
list-style: none outside none;
margin: 0;
overflow: hidden;
padding: 0;
position: absolute;
right: 0;
top: 61px;
}
#headerButtons li {
background-repeat: no-repeat;
display: inline;
margin-top: 0;
margin-bottom: 0;
padding: 0;
}
#toc_button button {
border-color: #ACACAC;
border-style: none solid none none;
border-width: 0 1px 0 0;
height: 28px;
margin: 0;
padding-left: 30px;
text-align: left;
width: 230px;
}
li#jumpto_button {
left: 230px;
margin-left: 0;
position: absolute;
}
li#jumpto_button select {
height: 22px;
margin: 5px 2px 0 10px;
max-width: 300px;
}
/* @end */
/* @group Table of contents */
#tocContainer.isShowingTOC {
border-right: 1px solid #ACACAC;
display: block;
overflow-x: hidden;
overflow-y: auto;
padding: 0;
}
#tocContainer {
background-color: #E4EBF7;
border-top: 1px solid #2B334F;
bottom: 0;
display: none;
left: 0;
overflow: hidden;
position: absolute;
top: 91px;
width: 229px;
}
#tocContainer > ul#toc {
font-size: 11px;
margin: 0;
padding: 12px 0 18px;
width: 209px;
-moz-user-select: none;
-webkit-user-select: none;
user-select: none;
}
#tocContainer > ul#toc > li {
margin: 0;
padding: 0 0 7px 30px;
text-indent: -15px;
}
#tocContainer > ul#toc > li > .sectionName a {
color: #000000;
font-weight: bold;
}
#tocContainer > ul#toc > li > .sectionName a:hover {
text-decoration: none;
}
#tocContainer > ul#toc li.children > ul {
display: none;
height: 0;
}
#tocContainer > ul#toc > li > ul {
margin: 0;
padding: 0;
}
#tocContainer > ul#toc > li > ul, ul#toc > li > ul > li {
margin-left: 0;
margin-bottom: 0;
padding-left: 15px;
}
#tocContainer > ul#toc > li ul {
list-style: none;
margin-right: 0;
padding-right: 0;
}
#tocContainer > ul#toc li.children.open > ul {
display: block;
height: auto;
margin-left: -15px;
padding-left: 0;
}
#tocContainer > ul#toc > li > ul, ul#toc > li > ul > li {
margin-left: 0;
padding-left: 15px;
}
#tocContainer li ul li {
margin-top: 0.583em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
#tocContainer li ul li span.sectionName {
white-space: normal;
}
#tocContainer > ul#toc > li > ul > li > .sectionName a {
font-weight: bold;
}
#tocContainer > ul#toc > li > ul a {
color: #4F4F4F;
}
/* @end */
/* @group Index formatting */
.index-title {
font-size: 13px;
font-weight: normal;
}
.index-column {
float: left;
width: 30%;
min-width: 200px;
font-size: 11px;
}
.index-column ul {
margin: 8px 0 0 0;
padding: 0;
list-style: none;
}
.index-column ul li {
margin: 0 0 3px 0;
padding: 0;
}
.hierarchy-column {
min-width: 400px;
}
.hierarchy-column ul {
margin: 3px 0 0 15px;
}
.hierarchy-column ul li {
list-style-type: square;
}
/* @end */
/* @group Common formatting elements */
.title {
font-weight: normal;
font-size: 215%;
margin-top:0;
}
.subtitle {
font-weight: normal;
font-size: 180%;
color: #3C4C6C;
border-bottom: 1px solid #5088C5;
}
.subsubtitle {
font-weight: normal;
font-size: 145%;
height: 0.7em;
}
.note {
border: 1px solid #5088C5;
background-color: white;
margin: 1.667em 0 1.75em 0;
padding: 0 .667em .083em .750em;
}
.warning {
border: 1px solid #5088C5;
background-color: #F0F3F7;
margin-bottom: 0.5em;
padding: 0.3em 0.8em;
}
.bug {
border: 1px solid #000;
background-color: #ffffcc;
margin-bottom: 0.5em;
padding: 0.3em 0.8em;
}
.deprecated {
color: #F60425;
}
/* @end */
/* @group Common layout */
.section {
margin-top: 3em;
}
/* @end */
/* @group Object specification section */
.section-specification {
margin-left: 2.5em;
margin-right: 2.5em;
font-size: 12px;
}
.section-specification table {
margin-bottom: 0em;
border-top: 1px solid #d6e0e5;
}
.section-specification td {
vertical-align: top;
border-bottom: 1px solid #d6e0e5;
border-left-width: 0px;
border-right-width: 0px;
border-top-width: 0px;
padding: .6em;
}
.section-specification .specification-title {
font-weight: bold;
}
/* @end */
/* @group Tasks section */
.task-list {
list-style-type: none;
padding-left: 0px;
}
.task-list li {
margin-bottom: 3px;
}
.task-item-suffix {
color: #996;
font-size: 12px;
font-style: italic;
margin-left: 0.5em;
}
span.tooltip span.tooltip {
font-size: 1.0em;
display: none;
padding: 0.3em;
border: 1px solid #aaa;
background-color: #fdfec8;
color: #000;
text-align: left;
}
span.tooltip:hover span.tooltip {
display: block;
position: absolute;
margin-left: 2em;
}
/* @end */
/* @group Method section */
.section-method {
margin-top: 2.3em;
}
.method-title {
margin-bottom: 1.5em;
}
.method-subtitle {
margin-top: 0.7em;
margin-bottom: 0.2em;
}
.method-subsection p {
margin-top: 0.4em;
margin-bottom: 0.8em;
}
.method-declaration {
margin-top:1.182em;
margin-bottom:.909em;
}
.method-declaration code {
font:14px Courier, Consolas, monospace;
color:#000;
}
.declaration {
color: #000;
}
.argument-def {
margin-top: 0.3em;
margin-bottom: 0.3em;
}
.argument-def dd {
margin-left: 1.25em;
}
.see-also-section ul {
list-style-type: none;
padding-left: 0px;
margin-top: 0;
}
.see-also-section li {
margin-bottom: 3px;
}
.declared-in-ref {
color: #666;
}
#tocContainer.hideInXcode {
display: none;
border: 0px solid black;
}
#top_header.hideInXcode {
display: none;
}
#contents.hideInXcode {
border: 0px solid black;
top: 0px;
left: 0px;
}
/* @end */

View File

@@ -0,0 +1,22 @@
header {
display: none;
}
div.main-navigation, div.navigation-top {
display: none;
}
div#overview_contents, div#contents.isShowingTOC, div#contents {
overflow: visible;
position: relative;
top: 0px;
border: none;
left: 0;
}
#tocContainer.isShowingTOC {
display: none;
}
nav {
display: none;
}

View File

@@ -0,0 +1,111 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SDWebImage 3.2 Hierarchy</title>
<link rel="stylesheet" type="text/css" href="css/styles.css" media="all" />
<link rel="stylesheet" type="text/css" media="print" href="css/stylesPrint.css" />
<meta name="generator" content="appledoc 2.1 (build 840)" />
</head>
<body>
<header id="top_header">
<div id="library" class="hideInXcode">
<h1><a id="libraryTitle" href="index.html">SDWebImage 3.2 </a></h1>
<a id="developerHome" href="index.html">Olivier Poitrey</a>
</div>
<div id="title" role="banner">
<h1 class="hideInXcode">SDWebImage 3.2 Hierarchy</h1>
</div>
<ul id="headerButtons" role="toolbar"></ul>
</header>
<article>
<div id="overview_contents" role="main">
<div class="main-navigation navigation-top">
<a href="index.html">Previous</a>
</div>
<div id="header">
<div class="section-header">
<h1 class="title title-header">SDWebImage 3.2 Hierarchy</h1>
</div>
</div>
<div id="container">
<div class="index-column hierarchy-column">
<h2 class="index-title">Class Hierarchy</h2>
<ul>
<li>NSObject
<ul>
<li><a href="Classes/SDImageCache.html">SDImageCache</a></li>
<li><a href="Classes/SDWebImageDownloader.html">SDWebImageDownloader</a></li>
<li><a href="Classes/SDWebImageManager.html">SDWebImageManager</a></li>
<li><a href="Classes/SDWebImagePrefetcher.html">SDWebImagePrefetcher</a></li>
</ul>
</li>
<li>NSOperation
<ul>
<li><a href="Classes/SDWebImageDownloaderOperation.html">SDWebImageDownloaderOperation</a></li>
</ul>
</li>
</ul>
</div>
<div class="index-column">
<h2 class="index-title">Protocol References</h2>
<ul>
<li><a href="Protocols/SDWebImageManagerDelegate.html">SDWebImageManagerDelegate</a></li>
<li><a href="Protocols/SDWebImageOperation.html">SDWebImageOperation</a></li>
</ul>
<h2 class="index-title">Category References</h2>
<ul>
<li><a href="Categories/MKAnnotationView+WebCache.html">MKAnnotationView(WebCache)</a></li>
<li><a href="Categories/UIButton+WebCache.html">UIButton(WebCache)</a></li>
<li><a href="Categories/UIImage+ForceDecode.html">UIImage(ForceDecode)</a></li>
<li><a href="Categories/UIImageView+WebCache.html">UIImageView(WebCache)</a></li>
</ul>
</div>
</div>
<div class="main-navigation navigation-bottom">
<a href="index.html">Previous</a>
</div>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2013 Olivier Poitrey. All rights reserved. (Last updated: 2013-04-02)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.1 (build 840)</a>.</span></p>
</div>
</div>
</div>
</article>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 B

View File

@@ -0,0 +1,371 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SDWebImage 3.2 Reference</title>
<link rel="stylesheet" type="text/css" href="css/styles.css" media="all" />
<link rel="stylesheet" type="text/css" media="print" href="css/stylesPrint.css" />
<meta name="generator" content="appledoc 2.1 (build 840)" />
</head>
<body>
<header id="top_header">
<div id="library" class="hideInXcode">
<h1><a id="libraryTitle" href="index.html">SDWebImage 3.2 </a></h1>
<a id="developerHome" href="index.html">Olivier Poitrey</a>
</div>
<div id="title" role="banner">
<h1 class="hideInXcode">SDWebImage 3.2 Reference</h1>
</div>
<ul id="headerButtons" role="toolbar"></ul>
</header>
<article>
<div id="overview_contents" role="main">
<div class="main-navigation navigation-top">
<a href="hierarchy.html">Next</a>
</div>
<div id="header">
<div class="section-header">
<h1 class="title title-header">SDWebImage 3.2 Reference</h1>
</div>
</div>
<div id="container">
<div class="section section-overview index-overview">
<h1>Web Image</h1>
<p>This library provides a category for UIImageVIew with support for remote images coming from the web.</p>
<p>It provides:</p>
<ul>
<li>An UIImageView category adding web image and cache management to the Cocoa Touch framework</li>
<li>An asynchronous image downloader</li>
<li>An asynchronous memory + disk image caching with automatic cache expiration handling</li>
<li>A background image decompression</li>
<li>A guarantee that the same URL won&rsquo;t be downloaded several times</li>
<li>A guarantee that bogus URLs won&rsquo;t be retried again and again</li>
<li>A guarantee that main thread will never be blocked</li>
<li>Performances!</li>
<li>Use GCD and ARC</li>
</ul>
<p>NOTE: The version 3.0 of SDWebImage isn&rsquo;t fully backward compatible with 2.0 and requires iOS 5.0
minimum deployement version. If you need iOS &lt; 5.0 support, please use the last <a href="https://github.com/rs/SDWebImage/tree/2.0-compat">2.0 version</a>.</p>
<p><a href="https://github.com/rs/SDWebImage/wiki/How-is-SDWebImage-better-than-X%3F">How is SDWebImage better than X?</a></p>
<h2>Who Use It</h2>
<p>Find out <a href="https://github.com/rs/SDWebImage/wiki/Who-Use-SDWebImage">who use SDWebImage</a> and add your app to the list.</p>
<h2>How To Use</h2>
<p>API documentation is available at <a href="http://hackemist.com/SDWebImage/doc/">http://hackemist.com/SDWebImage/doc/</a></p>
<h3>Using UIImageView+WebCache category with UITableView</h3>
<p>Just #import the UIImageView+WebCache.h header, and call the setImageWithURL:placeholderImage:
method from the tableView:cellForRowAtIndexPath: UITableViewDataSource method. Everything will be
handled for you, from async downloads to caching management.</p>
<p>```objective-c</p>
<h1>import &lt;SDWebImage/UIImageView+WebCache.h></h1>
<p>&hellip;</p>
<ul>
<li><p>(UITableViewCell <em>)tableView:(UITableView </em>)tableView cellForRowAtIndexPath:(NSIndexPath <em>)indexPath
{
static NSString </em>MyIdentifier = @&ldquo;MyIdentifier&rdquo;;</p>
<p> UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier];</p>
<p> if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
reuseIdentifier:MyIdentifier] autorelease];
}</p>
<p> // Here we use the new provided setImageWithURL: method to load the web image
[cell.imageView setImageWithURL:[NSURL URLWithString:@&ldquo;<a href="http://www.domain.com/path/to/image.jpg">http://www.domain.com/path/to/image.jpg</a>&rdquo;]
placeholderImage:[UIImage imageNamed:@&ldquo;placeholder.png&rdquo;]];</p>
<p> cell.textLabel.text = @&ldquo;My Text&rdquo;;
return cell;
}
```</p></li>
</ul>
<h3>Using blocks</h3>
<p>With blocks, you can be notified about the image download progress and whenever the image retrival
has completed with success or not:</p>
<p>```objective-c
// Here we use the new provided setImageWithURL: method to load the web image
[cell.imageView setImageWithURL:[NSURL URLWithString:@&ldquo;<a href="http://www.domain.com/path/to/image.jpg">http://www.domain.com/path/to/image.jpg</a>&rdquo;]</p>
<pre><code> placeholderImage:[UIImage imageNamed:@"placeholder.png"]
completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType) {... completion code here ...}];
</code></pre>
<p>```</p>
<p>Note: neither your success nor failure block will be call if your image request is canceled before completion.</p>
<h3>Using <a href="Classes/SDWebImageManager.html">SDWebImageManager</a></h3>
<p>The <a href="Classes/SDWebImageManager.html">SDWebImageManager</a> is the class behind the UIImageView+WebCache category. It ties the
asynchronous downloader with the image cache store. You can use this class directly to benefit
from web image downloading with caching in another context than a UIView (ie: with Cocoa).</p>
<p>Here is a simple example of how to use <a href="Classes/SDWebImageManager.html">SDWebImageManager</a>:</p>
<p>```objective-c
<a href="Classes/SDWebImageManager.html">SDWebImageManager</a> *manager = <a href="Classes/SDWebImageManager.html#//api/name/sharedManager">[SDWebImageManager sharedManager]</a>;
[manager downloadWithURL:imageURL</p>
<pre><code> options:0
progress:^(NSUInteger receivedSize, long long expectedSize)
{
// progression tracking code
}
completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType)
{
if (image)
{
// do something with image
}
}];
</code></pre>
<p>```</p>
<h3>Using Asynchronous Image Downloader Independently</h3>
<p>It&rsquo;s also possible to use the async image downloader independently:</p>
<p>```objective-c
[<a href="Classes/SDWebImageDownloader.html">SDWebImageDownloader</a>.sharedDownloader downloadImageWithURL:imageURL</p>
<pre><code> options:0
progress:^(NSUInteger receivedSize, long long expectedSize)
{
// progression tracking code
}
completed:^(UIImage *image, NSError *error, BOOL finished)
{
if (image &amp;&amp; finished)
{
// do something with image
}
}];
</code></pre>
<p>```</p>
<h3>Using Asynchronous Image Caching Independently</h3>
<p>It is also possible to use the aync based image cache store independently. <a href="Classes/SDImageCache.html">SDImageCache</a>
maintains a memory cache and an optional disk cache. Disk cache write operations are performed
asynchronous so it doesn&rsquo;t add unnecessary latency to the UI.</p>
<p>The <a href="Classes/SDImageCache.html">SDImageCache</a> class provides a singleton instance for convenience but you can create your own
instance if you want to create separated cache namespace.</p>
<p>To lookup the cache, you use the imageForKey: method. If the method returns nil, it means the cache
doesn&rsquo;t currently own the image. You are thus responsible for generating and caching it. The cache
key is an application unique identifier for the image to cache. It is generally the absolute URL of
the image.</p>
<p>```objective-c
<a href="Classes/SDImageCache.html">SDImageCache</a> <em>imageCache = [SDImageCache.alloc initWithNamespace:@&ldquo;myNamespace&rdquo;];
[imageCache queryDiskCacheForKey:myCacheKey done:^(UIImage </em>image)
{</p>
<pre><code>// image is not nil if image was found
</code></pre>
<p>}];
```</p>
<p>By default <a href="Classes/SDImageCache.html">SDImageCache</a> will lookup the disk cache if an image can&rsquo;t be found in the memory cache.
You can prevent this from happening by calling the alternative method <code>imageFromMemoryCacheForKey:</code>.</p>
<p>To store an image into the cache, you use the storeImage:forKey: method:</p>
<p><code>objective-c
[[SDImageCache sharedImageCache] storeImage:myImage forKey:myCacheKey];
</code></p>
<p>By default, the image will be stored in memory cache as well as on disk cache (asynchronously). If
you want only the memory cache, use the alternative method storeImage:forKey:toDisk: with a negative
third argument.</p>
<h3>Using cache key filter</h3>
<p>Sometime, you may not want to use the image URL as cache key because part of the URL is dynamic
(i.e.: for access control purpose). <a href="Classes/SDWebImageManager.html">SDWebImageManager</a> provides a way to set a cache key filter that
takes the NSURL as input, and output a cache key NSString.</p>
<p>The following example sets a filter in the application delegate that will remove any query-string from
the URL before to use it as a cache key:</p>
<p>```objective-c
&ndash; (BOOL)application:(UIApplication <em>)application didFinishLaunchingWithOptions:(NSDictionary </em>)launchOptions
{</p>
<pre><code>SDWebImageManager.sharedManager.cacheKeyFilter:^(NSURL *url)
{
url = [[[NSURL alloc] initWithScheme:url.scheme host:url.host path:url.path] autorelease];
return [url absoluteString];
};
// Your app init code...
return YES;
</code></pre>
<p>}
```</p>
<h2>Common Problems</h2>
<h3>Using dynamic image size with UITableViewCell</h3>
<p>UITableView determins the size of the image by the first image set for a cell. If your remote images
don&rsquo;t have the same size as your placeholder image, you may experience strange anamorphic scaling issue.
The following article gives a way to workaround this issue:</p>
<p><a href="http://www.wrichards.com/blog/2011/11/sdwebimage-fixed-width-cell-images/">http://www.wrichards.com/blog/2011/11/sdwebimage-fixed-width-cell-images/</a></p>
<h2>Installation</h2>
<p>There are two ways to use this in your project: copy all the files into your project, or import the project as a static library.</p>
<h3>Add the SDWebImage project to your project</h3>
<ul>
<li>Download and unzip the last version of the framework from the <a href="https://github.com/rs/SDWebImage/wiki/Download-Complied-Framework">download page</a></li>
<li>Right-click on the project navigator and select &ldquo;Add Files to "Your Project&rdquo;:</li>
<li>In the dialog, select SDWebImage.framework:</li>
<li>Check the &ldquo;Copy items into destination group&rsquo;s folder (if needed)&rdquo; checkbox</li>
</ul>
<h3>Add dependencies</h3>
<ul>
<li>In you application project apps target settings, find the &ldquo;Build Phases&rdquo; section and open the &ldquo;Link Binary With Libraries&rdquo; block:</li>
<li>Click the &ldquo;+&rdquo; button again and select the &ldquo;ImageIO.framework&rdquo;, this is needed by the progressive download feature:</li>
</ul>
<h3>Add Linker Flag</h3>
<p>Open the &ldquo;Build Settings&rdquo; tab, in the &ldquo;Linking&rdquo; section, locate the &ldquo;Other Linker Flags&rdquo; setting and add the &ldquo;-ObjC&rdquo; flag:</p>
<p><img src="[http://dl.dropbox.com/u/123346/SDWebImage/10](http://dl.dropbox.com/u/123346/SDWebImage/10" alt="Other Linker Flags" />_other_linker_flags.jpg)</p>
<h3>Import headers in your source files</h3>
<p>In the source files where you need to use the library, import the header file:</p>
<p>```objective-c</p>
<h1>import &lt;SDWebImage/UIImageView+WebCache.h></h1>
<p>```</p>
<h3>Build Project</h3>
<p>At this point your workspace should build without error. If you are having problem, post to the Issue and the
community can help you solve it.</p>
<h2>Future Enhancements</h2>
<ul>
<li>LRU memory cache cleanup instead of reset on memory warning</li>
</ul>
<h2>Licenses</h2>
<p>All source code is licensed under the <a href="https://raw.github.com/rs/SDWebImage/master/LICENSE">MIT License</a>.</p>
</div>
<div class="index-column">
<h2 class="index-title">Class References</h2>
<ul>
<li><a href="Classes/SDImageCache.html">SDImageCache</a></li>
<li><a href="Classes/SDWebImageDownloader.html">SDWebImageDownloader</a></li>
<li><a href="Classes/SDWebImageDownloaderOperation.html">SDWebImageDownloaderOperation</a></li>
<li><a href="Classes/SDWebImageManager.html">SDWebImageManager</a></li>
<li><a href="Classes/SDWebImagePrefetcher.html">SDWebImagePrefetcher</a></li>
</ul>
</div>
<div class="index-column">
<h2 class="index-title">Protocol References</h2>
<ul>
<li><a href="Protocols/SDWebImageManagerDelegate.html">SDWebImageManagerDelegate</a></li>
<li><a href="Protocols/SDWebImageOperation.html">SDWebImageOperation</a></li>
</ul>
<h2 class="index-title">Category References</h2>
<ul>
<li><a href="Categories/MKAnnotationView+WebCache.html">MKAnnotationView(WebCache)</a></li>
<li><a href="Categories/UIButton+WebCache.html">UIButton(WebCache)</a></li>
<li><a href="Categories/UIImage+ForceDecode.html">UIImage(ForceDecode)</a></li>
<li><a href="Categories/UIImageView+WebCache.html">UIImageView(WebCache)</a></li>
</ul>
</div>
</div>
<div class="main-navigation navigation-bottom">
<a href="hierarchy.html">Next</a>
</div>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2013 Olivier Poitrey. All rights reserved. (Last updated: 2013-04-02)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.1 (build 840)</a>.</span></p>
</div>
</div>
</div>
</article>
</body>
</html>

View File

@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="UTF-8"?>
<DocSetNodes version="1.0">
<TOC>
<Node type="folder">
<Name>SDWebImage 3.2</Name>
<Path>index.html</Path>
<Subnodes>
<Node type="folder">
<Name>Classes</Name>
<Path>index.html</Path>
<Subnodes>
<NodeRef refid="1"/>
<NodeRef refid="2"/>
<NodeRef refid="3"/>
<NodeRef refid="4"/>
<NodeRef refid="5"/>
</Subnodes>
</Node>
<Node type="folder">
<Name>Categories</Name>
<Path>index.html</Path>
<Subnodes>
<NodeRef refid="6"/>
<NodeRef refid="7"/>
<NodeRef refid="8"/>
<NodeRef refid="9"/>
</Subnodes>
</Node>
<Node type="folder">
<Name>Protocols</Name>
<Path>index.html</Path>
<Subnodes>
<NodeRef refid="10"/>
<NodeRef refid="11"/>
</Subnodes>
</Node>
</Subnodes>
</Node>
</TOC>
<Library>
<Node id="1">
<Name>SDImageCache</Name>
<Path>Classes/SDImageCache.html</Path>
</Node>
<Node id="2">
<Name>SDWebImageDownloader</Name>
<Path>Classes/SDWebImageDownloader.html</Path>
</Node>
<Node id="3">
<Name>SDWebImageDownloaderOperation</Name>
<Path>Classes/SDWebImageDownloaderOperation.html</Path>
</Node>
<Node id="4">
<Name>SDWebImageManager</Name>
<Path>Classes/SDWebImageManager.html</Path>
</Node>
<Node id="5">
<Name>SDWebImagePrefetcher</Name>
<Path>Classes/SDWebImagePrefetcher.html</Path>
</Node>
<Node id="6">
<Name>MKAnnotationView(WebCache)</Name>
<Path>Categories/MKAnnotationView+WebCache.html</Path>
</Node>
<Node id="7">
<Name>UIButton(WebCache)</Name>
<Path>Categories/UIButton+WebCache.html</Path>
</Node>
<Node id="8">
<Name>UIImage(ForceDecode)</Name>
<Path>Categories/UIImage+ForceDecode.html</Path>
</Node>
<Node id="9">
<Name>UIImageView(WebCache)</Name>
<Path>Categories/UIImageView+WebCache.html</Path>
</Node>
<Node id="10">
<Name>SDWebImageManagerDelegate</Name>
<Path>Protocols/SDWebImageManagerDelegate.html</Path>
</Node>
<Node id="11">
<Name>SDWebImageOperation</Name>
<Path>Protocols/SDWebImageOperation.html</Path>
</Node>
</Library>
</DocSetNodes>

View File

@@ -0,0 +1,271 @@
<?xml version="1.0" encoding="UTF-8"?>
<Tokens version="1.0">
<File path="Classes/SDImageCache.html">
<Token>
<TokenIdentifier>//apple_ref/occ/cl/SDImageCache</TokenIdentifier>
<Abstract type="html">SDImageCache maintains a memory cache and an optional disk cache. Disk cache write operations are performed
asynchronous so it doesnt add unnecessary latency to the UI.</Abstract>
<DeclaredIn>SDImageCache.h</DeclaredIn>
<NodeRef refid="1"/>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDImageCache/setMaxCacheAge:</TokenIdentifier>
<Abstract type="html">The maximum length of time to keep an image in the cache, in seconds</Abstract>
<DeclaredIn>SDImageCache.h</DeclaredIn>
<Declaration>@property (assign, nonatomic) NSInteger maxCacheAge</Declaration>
<Anchor>//api/name/maxCacheAge</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instp/SDImageCache/maxCacheAge</TokenIdentifier>
<Abstract type="html">The maximum length of time to keep an image in the cache, in seconds</Abstract>
<DeclaredIn>SDImageCache.h</DeclaredIn>
<Declaration>@property (assign, nonatomic) NSInteger maxCacheAge</Declaration>
<Anchor>//api/name/maxCacheAge</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/clm/SDImageCache/sharedImageCache</TokenIdentifier>
<Abstract type="html">Returns global shared cache instance</Abstract>
<DeclaredIn>SDImageCache.h</DeclaredIn>
<Declaration>+ (SDImageCache *)sharedImageCache</Declaration>
<ReturnValue><Abstract type="html">SDImageCache global instance</Abstract></ReturnValue>
<Anchor>//api/name/sharedImageCache</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDImageCache/initWithNamespace:</TokenIdentifier>
<Abstract type="html">Init a new cache store with a specific namespace</Abstract>
<DeclaredIn>SDImageCache.h</DeclaredIn>
<Declaration>- (id)initWithNamespace:(NSString *)ns</Declaration>
<Parameters>
<Parameter>
<Name>ns</Name>
<Abstract type="html">The namespace to use for this cache store</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/initWithNamespace:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDImageCache/storeImage:forKey:</TokenIdentifier>
<Abstract type="html">Store an image into memory and disk cache at the given key.</Abstract>
<DeclaredIn>SDImageCache.h</DeclaredIn>
<Declaration>- (void)storeImage:(UIImage *)image forKey:(NSString *)key</Declaration>
<Parameters>
<Parameter>
<Name>image</Name>
<Abstract type="html">The image to store</Abstract>
</Parameter><Parameter>
<Name>key</Name>
<Abstract type="html">The unique image cache key, usually it&apos;s image absolute URL</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/storeImage:forKey:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDImageCache/storeImage:forKey:toDisk:</TokenIdentifier>
<Abstract type="html">Store an image into memory and optionally disk cache at the given key.</Abstract>
<DeclaredIn>SDImageCache.h</DeclaredIn>
<Declaration>- (void)storeImage:(UIImage *)image forKey:(NSString *)key toDisk:(BOOL)toDisk</Declaration>
<Parameters>
<Parameter>
<Name>image</Name>
<Abstract type="html">The image to store</Abstract>
</Parameter><Parameter>
<Name>key</Name>
<Abstract type="html">The unique image cache key, usually it&apos;s image absolute URL</Abstract>
</Parameter><Parameter>
<Name>toDisk</Name>
<Abstract type="html">Store the image to disk cache if YES</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/storeImage:forKey:toDisk:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDImageCache/storeImage:imageData:forKey:toDisk:</TokenIdentifier>
<Abstract type="html">Store an image into memory and optionally disk cache at the given key.</Abstract>
<DeclaredIn>SDImageCache.h</DeclaredIn>
<Declaration>- (void)storeImage:(UIImage *)image imageData:(NSData *)data forKey:(NSString *)key toDisk:(BOOL)toDisk</Declaration>
<Parameters>
<Parameter>
<Name>image</Name>
<Abstract type="html">The image to store</Abstract>
</Parameter><Parameter>
<Name>data</Name>
<Abstract type="html">The image data as returned by the server, this representation will be used for disk storage
instead of converting the given image object into a storable/compressed image format in order
to save quality and CPU</Abstract>
</Parameter><Parameter>
<Name>key</Name>
<Abstract type="html">The unique image cache key, usually it&apos;s image absolute URL</Abstract>
</Parameter><Parameter>
<Name>toDisk</Name>
<Abstract type="html">Store the image to disk cache if YES</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/storeImage:imageData:forKey:toDisk:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDImageCache/queryDiskCacheForKey:done:</TokenIdentifier>
<Abstract type="html">Query the disk cache asynchronousely.</Abstract>
<DeclaredIn>SDImageCache.h</DeclaredIn>
<Declaration>- (void)queryDiskCacheForKey:(NSString *)key done:(void ( ^ ) ( UIImage *image , SDImageCacheType cacheType ))doneBlock</Declaration>
<Parameters>
<Parameter>
<Name>key</Name>
<Abstract type="html">The unique key used to store the wanted image</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/queryDiskCacheForKey:done:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDImageCache/imageFromMemoryCacheForKey:</TokenIdentifier>
<Abstract type="html">Query the memory cache.</Abstract>
<DeclaredIn>SDImageCache.h</DeclaredIn>
<Declaration>- (UIImage *)imageFromMemoryCacheForKey:(NSString *)key</Declaration>
<Parameters>
<Parameter>
<Name>key</Name>
<Abstract type="html">The unique key used to store the wanted image</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/imageFromMemoryCacheForKey:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDImageCache/imageFromDiskCacheForKey:</TokenIdentifier>
<Abstract type="html">Query the disk cache synchronousely.</Abstract>
<DeclaredIn>SDImageCache.h</DeclaredIn>
<Declaration>- (UIImage *)imageFromDiskCacheForKey:(NSString *)key</Declaration>
<Parameters>
<Parameter>
<Name>key</Name>
<Abstract type="html">The unique key used to store the wanted image</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/imageFromDiskCacheForKey:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDImageCache/removeImageForKey:</TokenIdentifier>
<Abstract type="html">Remove the image from memory and disk cache synchronousely</Abstract>
<DeclaredIn>SDImageCache.h</DeclaredIn>
<Declaration>- (void)removeImageForKey:(NSString *)key</Declaration>
<Parameters>
<Parameter>
<Name>key</Name>
<Abstract type="html">The unique image cache key</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/removeImageForKey:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDImageCache/removeImageForKey:fromDisk:</TokenIdentifier>
<Abstract type="html">Remove the image from memory and optionaly disk cache synchronousely</Abstract>
<DeclaredIn>SDImageCache.h</DeclaredIn>
<Declaration>- (void)removeImageForKey:(NSString *)key fromDisk:(BOOL)fromDisk</Declaration>
<Parameters>
<Parameter>
<Name>key</Name>
<Abstract type="html">The unique image cache key</Abstract>
</Parameter><Parameter>
<Name>fromDisk</Name>
<Abstract type="html">Also remove cache entry from disk if YES</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/removeImageForKey:fromDisk:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDImageCache/clearMemory</TokenIdentifier>
<Abstract type="html">Clear all memory cached images</Abstract>
<DeclaredIn>SDImageCache.h</DeclaredIn>
<Declaration>- (void)clearMemory</Declaration>
<Anchor>//api/name/clearMemory</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDImageCache/clearDisk</TokenIdentifier>
<Abstract type="html">Clear all disk cached images</Abstract>
<DeclaredIn>SDImageCache.h</DeclaredIn>
<Declaration>- (void)clearDisk</Declaration>
<Anchor>//api/name/clearDisk</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDImageCache/cleanDisk</TokenIdentifier>
<Abstract type="html">Remove all expired cached image from disk</Abstract>
<DeclaredIn>SDImageCache.h</DeclaredIn>
<Declaration>- (void)cleanDisk</Declaration>
<Anchor>//api/name/cleanDisk</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDImageCache/getSize</TokenIdentifier>
<Abstract type="html">Get the size used by the disk cache</Abstract>
<DeclaredIn>SDImageCache.h</DeclaredIn>
<Declaration>- (int)getSize</Declaration>
<Anchor>//api/name/getSize</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDImageCache/getDiskCount</TokenIdentifier>
<Abstract type="html">Get the number of images in the disk cache</Abstract>
<DeclaredIn>SDImageCache.h</DeclaredIn>
<Declaration>- (int)getDiskCount</Declaration>
<Anchor>//api/name/getDiskCount</Anchor>
</Token>
</File>
</Tokens>

View File

@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<Tokens version="1.0">
<File path="Protocols/SDWebImageManagerDelegate.html">
<Token>
<TokenIdentifier>//apple_ref/occ/intf/SDWebImageManagerDelegate</TokenIdentifier>
<Abstract type="html">Even if the image is cached, respect the HTTP response cache control, and refresh the image from remote location if needed.
The disk caching will be handled by NSURLCache instead of SDWebImage leading to slight performance degradation.
This option helps deal with images changing behind the same request URL, e.g. Facebook graph api profile pics.
If a cached image is refreshed, the completion block is called once with the cached image and again with the final image.</Abstract>
<DeclaredIn>SDWebImageManager.h</DeclaredIn>
<NodeRef refid="10"/>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/SDWebImageManagerDelegate/imageManager:shouldDownloadImageForURL:</TokenIdentifier>
<Abstract type="html">Controls which image should be downloaded when the image is not found in the cache.</Abstract>
<DeclaredIn>SDWebImageManager.h</DeclaredIn>
<Declaration>- (BOOL)imageManager:(SDWebImageManager *)imageManager shouldDownloadImageForURL:(NSURL *)imageURL</Declaration>
<Parameters>
<Parameter>
<Name>imageManager</Name>
<Abstract type="html">The current SDWebImageManager</Abstract>
</Parameter><Parameter>
<Name>imageURL</Name>
<Abstract type="html">The url of the image to be downloaded</Abstract>
</Parameter>
</Parameters>
<ReturnValue><Abstract type="html">Return NO to prevent the downloading of the image on cache misses. If not implemented, YES is implied.</Abstract></ReturnValue>
<Anchor>//api/name/imageManager:shouldDownloadImageForURL:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/SDWebImageManagerDelegate/imageManager:transformDownloadedImage:withURL:</TokenIdentifier>
<Abstract type="html">Allows to transform the image immediately after it has been downloaded and just before to cache it on disk and memory.
NOTE: This method is called from a global queue in order to not to block the main thread.</Abstract>
<DeclaredIn>SDWebImageManager.h</DeclaredIn>
<Declaration>- (UIImage *)imageManager:(SDWebImageManager *)imageManager transformDownloadedImage:(UIImage *)image withURL:(NSURL *)imageURL</Declaration>
<Parameters>
<Parameter>
<Name>imageManager</Name>
<Abstract type="html">The current SDWebImageManager</Abstract>
</Parameter><Parameter>
<Name>image</Name>
<Abstract type="html">The image to transform</Abstract>
</Parameter><Parameter>
<Name>imageURL</Name>
<Abstract type="html">The url of the image to transform</Abstract>
</Parameter>
</Parameters>
<ReturnValue><Abstract type="html">The transformed image object.</Abstract></ReturnValue>
<Anchor>//api/name/imageManager:transformDownloadedImage:withURL:</Anchor>
</Token>
</File>
</Tokens>

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<Tokens version="1.0">
<File path="Protocols/SDWebImageOperation.html">
<Token>
<TokenIdentifier>//apple_ref/occ/intf/SDWebImageOperation</TokenIdentifier>
<Abstract type="html"></Abstract>
<DeclaredIn>SDWebImageOperation.h</DeclaredIn>
<NodeRef refid="11"/>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/SDWebImageOperation/cancel</TokenIdentifier>
<Abstract type="html"></Abstract>
<DeclaredIn>SDWebImageOperation.h</DeclaredIn>
<Declaration>- (void)cancel</Declaration>
<Anchor>//api/name/cancel</Anchor>
</Token>
</File>
</Tokens>

View File

@@ -0,0 +1,132 @@
<?xml version="1.0" encoding="UTF-8"?>
<Tokens version="1.0">
<File path="Classes/SDWebImageDownloader.html">
<Token>
<TokenIdentifier>//apple_ref/occ/cl/SDWebImageDownloader</TokenIdentifier>
<Abstract type="html">Asynchronous downloader dedicated and optimized for image loading.</Abstract>
<DeclaredIn>SDWebImageDownloader.h</DeclaredIn>
<NodeRef refid="2"/>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDWebImageDownloader/setMaxConcurrentDownloads:</TokenIdentifier>
<Abstract type="html"></Abstract>
<DeclaredIn>SDWebImageDownloader.h</DeclaredIn>
<Declaration>@property (assign, nonatomic) NSInteger maxConcurrentDownloads</Declaration>
<Anchor>//api/name/maxConcurrentDownloads</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instp/SDWebImageDownloader/maxConcurrentDownloads</TokenIdentifier>
<Abstract type="html"></Abstract>
<DeclaredIn>SDWebImageDownloader.h</DeclaredIn>
<Declaration>@property (assign, nonatomic) NSInteger maxConcurrentDownloads</Declaration>
<Anchor>//api/name/maxConcurrentDownloads</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDWebImageDownloader/setQueueMode:</TokenIdentifier>
<Abstract type="html">Changes download operations unqueue mode. Default value is SDWebImageDownloaderFILOQueueMode.</Abstract>
<DeclaredIn>SDWebImageDownloader.h</DeclaredIn>
<Declaration>@property (assign, nonatomic) SDWebImageDownloaderQueueMode queueMode</Declaration>
<Anchor>//api/name/queueMode</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instp/SDWebImageDownloader/queueMode</TokenIdentifier>
<Abstract type="html">Changes download operations unqueue mode. Default value is SDWebImageDownloaderFILOQueueMode.</Abstract>
<DeclaredIn>SDWebImageDownloader.h</DeclaredIn>
<Declaration>@property (assign, nonatomic) SDWebImageDownloaderQueueMode queueMode</Declaration>
<Anchor>//api/name/queueMode</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/clm/SDWebImageDownloader/sharedDownloader</TokenIdentifier>
<Abstract type="html"></Abstract>
<DeclaredIn>SDWebImageDownloader.h</DeclaredIn>
<Declaration>+ (SDWebImageDownloader *)sharedDownloader</Declaration>
<Anchor>//api/name/sharedDownloader</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDWebImageDownloader/setValue:forHTTPHeaderField:</TokenIdentifier>
<Abstract type="html">Set a value for a HTTP header to be appended to each download HTTP request.</Abstract>
<DeclaredIn>SDWebImageDownloader.h</DeclaredIn>
<Declaration>- (void)setValue:(NSString *)value forHTTPHeaderField:(NSString *)field</Declaration>
<Parameters>
<Parameter>
<Name>value</Name>
<Abstract type="html">The value for the header field. Use nil value to remove the header.</Abstract>
</Parameter><Parameter>
<Name>field</Name>
<Abstract type="html">The name of the header field to set.</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/setValue:forHTTPHeaderField:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDWebImageDownloader/valueForHTTPHeaderField:</TokenIdentifier>
<Abstract type="html">Returns the value of the specified HTTP header field.</Abstract>
<DeclaredIn>SDWebImageDownloader.h</DeclaredIn>
<Declaration>- (NSString *)valueForHTTPHeaderField:(NSString *)field</Declaration>
<ReturnValue><Abstract type="html">The value associated with the header field field, or nil if there is no corresponding header field.</Abstract></ReturnValue>
<Anchor>//api/name/valueForHTTPHeaderField:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDWebImageDownloader/downloadImageWithURL:options:progress:completed:</TokenIdentifier>
<Abstract type="html">Creates a SDWebImageDownloader async downloader instance with a given URL</Abstract>
<DeclaredIn>SDWebImageDownloader.h</DeclaredIn>
<Declaration>- (id&lt;SDWebImageOperation&gt;)downloadImageWithURL:(NSURL *)url options:(SDWebImageDownloaderOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageDownloaderCompletedBlock)completedBlock</Declaration>
<Parameters>
<Parameter>
<Name>url</Name>
<Abstract type="html">The URL to the image to download</Abstract>
</Parameter><Parameter>
<Name>options</Name>
<Abstract type="html">The options to be used for this download</Abstract>
</Parameter><Parameter>
<Name>completed</Name>
<Abstract type="html">A block called once the download is completed.
If the download succeeded, the image parameter is set, in case of error,
error parameter is set with the error. The last parameter is always YES
if SDWebImageDownloaderProgressiveDownload isn&apos;t use. With the
SDWebImageDownloaderProgressiveDownload option, this block is called
repeatedly with the partial image object and the finished argument set to NO
before to be called a last time with the full image and finished argument
set to YES. In case of error, the finished argument is always YES.</Abstract>
</Parameter><Parameter>
<Name>progress</Name>
<Abstract type="html">A block called repeatedly while the image is downloading</Abstract>
</Parameter>
</Parameters>
<ReturnValue><Abstract type="html">A cancellable SDWebImageOperation</Abstract></ReturnValue>
<Anchor>//api/name/downloadImageWithURL:options:progress:completed:</Anchor>
</Token>
</File>
</Tokens>

View File

@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<Tokens version="1.0">
<File path="Classes/SDWebImageDownloaderOperation.html">
<Token>
<TokenIdentifier>//apple_ref/occ/cl/SDWebImageDownloaderOperation</TokenIdentifier>
<Abstract type="html"></Abstract>
<DeclaredIn>SDWebImageDownloaderOperation.h</DeclaredIn>
<NodeRef refid="3"/>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDWebImageDownloaderOperation/setRequest:</TokenIdentifier>
<Abstract type="html"></Abstract>
<DeclaredIn>SDWebImageDownloaderOperation.h</DeclaredIn>
<Declaration>@property (strong, nonatomic, readonly) NSURLRequest *request</Declaration>
<Anchor>//api/name/request</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instp/SDWebImageDownloaderOperation/request</TokenIdentifier>
<Abstract type="html"></Abstract>
<DeclaredIn>SDWebImageDownloaderOperation.h</DeclaredIn>
<Declaration>@property (strong, nonatomic, readonly) NSURLRequest *request</Declaration>
<Anchor>//api/name/request</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDWebImageDownloaderOperation/setOptions:</TokenIdentifier>
<Abstract type="html"></Abstract>
<DeclaredIn>SDWebImageDownloaderOperation.h</DeclaredIn>
<Declaration>@property (assign, nonatomic, readonly) SDWebImageDownloaderOptions options</Declaration>
<Anchor>//api/name/options</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instp/SDWebImageDownloaderOperation/options</TokenIdentifier>
<Abstract type="html"></Abstract>
<DeclaredIn>SDWebImageDownloaderOperation.h</DeclaredIn>
<Declaration>@property (assign, nonatomic, readonly) SDWebImageDownloaderOptions options</Declaration>
<Anchor>//api/name/options</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDWebImageDownloaderOperation/initWithRequest:queue:options:progress:completed:cancelled:</TokenIdentifier>
<Abstract type="html"></Abstract>
<DeclaredIn>SDWebImageDownloaderOperation.h</DeclaredIn>
<Declaration>- (id)initWithRequest:(NSURLRequest *)request queue:(dispatch_queue_t)queue options:(SDWebImageDownloaderOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageDownloaderCompletedBlock)completedBlock cancelled:(void ( ^ ) ( ))cancelBlock</Declaration>
<Anchor>//api/name/initWithRequest:queue:options:progress:completed:cancelled:</Anchor>
</Token>
</File>
</Tokens>

View File

@@ -0,0 +1,180 @@
<?xml version="1.0" encoding="UTF-8"?>
<Tokens version="1.0">
<File path="Classes/SDWebImageManager.html">
<Token>
<TokenIdentifier>//apple_ref/occ/cl/SDWebImageManager</TokenIdentifier>
<Abstract type="html">The SDWebImageManager is the class behind the UIImageView+WebCache category and likes.
It ties the asynchronous downloader (SDWebImageDownloader with the image cache store (SDImageCache.
You can use this class directly to benefit from web image downloading with caching in another context than
a UIView.</Abstract>
<DeclaredIn>SDWebImageManager.h</DeclaredIn>
<NodeRef refid="4"/>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDWebImageManager/setDelegate:</TokenIdentifier>
<Abstract type="html"></Abstract>
<DeclaredIn>SDWebImageManager.h</DeclaredIn>
<Declaration>@property (weak, nonatomic) id&lt;SDWebImageManagerDelegate&gt; delegate</Declaration>
<Anchor>//api/name/delegate</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instp/SDWebImageManager/delegate</TokenIdentifier>
<Abstract type="html"></Abstract>
<DeclaredIn>SDWebImageManager.h</DeclaredIn>
<Declaration>@property (weak, nonatomic) id&lt;SDWebImageManagerDelegate&gt; delegate</Declaration>
<Anchor>//api/name/delegate</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDWebImageManager/setImageCache:</TokenIdentifier>
<Abstract type="html"></Abstract>
<DeclaredIn>SDWebImageManager.h</DeclaredIn>
<Declaration>@property (strong, nonatomic, readonly) SDImageCache *imageCache</Declaration>
<Anchor>//api/name/imageCache</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instp/SDWebImageManager/imageCache</TokenIdentifier>
<Abstract type="html"></Abstract>
<DeclaredIn>SDWebImageManager.h</DeclaredIn>
<Declaration>@property (strong, nonatomic, readonly) SDImageCache *imageCache</Declaration>
<Anchor>//api/name/imageCache</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDWebImageManager/setImageDownloader:</TokenIdentifier>
<Abstract type="html"></Abstract>
<DeclaredIn>SDWebImageManager.h</DeclaredIn>
<Declaration>@property (strong, nonatomic, readonly) SDWebImageDownloader *imageDownloader</Declaration>
<Anchor>//api/name/imageDownloader</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instp/SDWebImageManager/imageDownloader</TokenIdentifier>
<Abstract type="html"></Abstract>
<DeclaredIn>SDWebImageManager.h</DeclaredIn>
<Declaration>@property (strong, nonatomic, readonly) SDWebImageDownloader *imageDownloader</Declaration>
<Anchor>//api/name/imageDownloader</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDWebImageManager/setCacheKeyFilter:</TokenIdentifier>
<Abstract type="html">The cache filter is a block used each time SDWebImageManager need to convert an URL into a cache key. This can
be used to remove dynamic part of an image URL.</Abstract>
<DeclaredIn>SDWebImageManager.h</DeclaredIn>
<Declaration>@property (strong) NSString *^ ) ( NSURL *url ) cacheKeyFilter</Declaration>
<Anchor>//api/name/cacheKeyFilter</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instp/SDWebImageManager/cacheKeyFilter</TokenIdentifier>
<Abstract type="html">The cache filter is a block used each time SDWebImageManager need to convert an URL into a cache key. This can
be used to remove dynamic part of an image URL.</Abstract>
<DeclaredIn>SDWebImageManager.h</DeclaredIn>
<Declaration>@property (strong) NSString *^ ) ( NSURL *url ) cacheKeyFilter</Declaration>
<Anchor>//api/name/cacheKeyFilter</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/clm/SDWebImageManager/sharedManager</TokenIdentifier>
<Abstract type="html">Returns global SDWebImageManager instance.</Abstract>
<DeclaredIn>SDWebImageManager.h</DeclaredIn>
<Declaration>+ (SDWebImageManager *)sharedManager</Declaration>
<ReturnValue><Abstract type="html">SDWebImageManager shared instance</Abstract></ReturnValue>
<Anchor>//api/name/sharedManager</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDWebImageManager/downloadWithURL:options:progress:completed:</TokenIdentifier>
<Abstract type="html">Downloads the image at the given URL if not present in cache or return the cached version otherwise.</Abstract>
<DeclaredIn>SDWebImageManager.h</DeclaredIn>
<Declaration>- (id&lt;SDWebImageOperation&gt;)downloadWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletedWithFinishedBlock)completedBlock</Declaration>
<Parameters>
<Parameter>
<Name>url</Name>
<Abstract type="html">The URL to the image</Abstract>
</Parameter><Parameter>
<Name>options</Name>
<Abstract type="html">A mask to specify options to use for this request</Abstract>
</Parameter><Parameter>
<Name>progressBlock</Name>
<Abstract type="html">A block called while image is downloading</Abstract>
</Parameter><Parameter>
<Name>completedBlock</Name>
<Abstract type="html">A block called when operation has been completed.
This block as no return value and takes the requested UIImage as first parameter.
In case of error the image parameter is nil and the second parameter may contain an NSError.
The third parameter is a Boolean indicating if the image was retrived from the local cache
of from the network.
The last parameter is set to NO when the SDWebImageProgressiveDownload option is used and
the image is downloading. This block is thus called repetidly with a partial image. When
image is fully downloaded, the block is called a last time with the full image and the last
parameter set to YES.</Abstract>
</Parameter><Parameter>
<Name>delegate</Name>
<Abstract type="html">The delegate object used to send result back</Abstract>
</Parameter>
</Parameters>
<ReturnValue><Abstract type="html">Returns a cancellable NSOperation</Abstract></ReturnValue>
<Anchor>//api/name/downloadWithURL:options:progress:completed:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDWebImageManager/cancelAll</TokenIdentifier>
<Abstract type="html">Cancel all current opreations</Abstract>
<DeclaredIn>SDWebImageManager.h</DeclaredIn>
<Declaration>- (void)cancelAll</Declaration>
<Anchor>//api/name/cancelAll</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDWebImageManager/isRunning</TokenIdentifier>
<Abstract type="html">Check one or more operations running</Abstract>
<DeclaredIn>SDWebImageManager.h</DeclaredIn>
<Declaration>- (BOOL)isRunning</Declaration>
<Anchor>//api/name/isRunning</Anchor>
</Token>
</File>
</Tokens>

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="UTF-8"?>
<Tokens version="1.0">
<File path="Classes/SDWebImagePrefetcher.html">
<Token>
<TokenIdentifier>//apple_ref/occ/cl/SDWebImagePrefetcher</TokenIdentifier>
<Abstract type="html">Prefetch some URLs in the cache for future use. Images are downloaded in low priority.</Abstract>
<DeclaredIn>SDWebImagePrefetcher.h</DeclaredIn>
<NodeRef refid="5"/>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDWebImagePrefetcher/setMaxConcurrentDownloads:</TokenIdentifier>
<Abstract type="html">Maximum number of URLs to prefetch at the same time. Defaults to 3.</Abstract>
<DeclaredIn>SDWebImagePrefetcher.h</DeclaredIn>
<Declaration>@property (nonatomic, assign) NSUInteger maxConcurrentDownloads</Declaration>
<Anchor>//api/name/maxConcurrentDownloads</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instp/SDWebImagePrefetcher/maxConcurrentDownloads</TokenIdentifier>
<Abstract type="html">Maximum number of URLs to prefetch at the same time. Defaults to 3.</Abstract>
<DeclaredIn>SDWebImagePrefetcher.h</DeclaredIn>
<Declaration>@property (nonatomic, assign) NSUInteger maxConcurrentDownloads</Declaration>
<Anchor>//api/name/maxConcurrentDownloads</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDWebImagePrefetcher/setOptions:</TokenIdentifier>
<Abstract type="html">SDWebImageOptions for prefetcher. Defaults to SDWebImageLowPriority.</Abstract>
<DeclaredIn>SDWebImagePrefetcher.h</DeclaredIn>
<Declaration>@property (nonatomic, assign) SDWebImageOptions options</Declaration>
<Anchor>//api/name/options</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instp/SDWebImagePrefetcher/options</TokenIdentifier>
<Abstract type="html">SDWebImageOptions for prefetcher. Defaults to SDWebImageLowPriority.</Abstract>
<DeclaredIn>SDWebImagePrefetcher.h</DeclaredIn>
<Declaration>@property (nonatomic, assign) SDWebImageOptions options</Declaration>
<Anchor>//api/name/options</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/clm/SDWebImagePrefetcher/sharedImagePrefetcher</TokenIdentifier>
<Abstract type="html">Return the global image prefetcher instance.</Abstract>
<DeclaredIn>SDWebImagePrefetcher.h</DeclaredIn>
<Declaration>+ (SDWebImagePrefetcher *)sharedImagePrefetcher</Declaration>
<Anchor>//api/name/sharedImagePrefetcher</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDWebImagePrefetcher/prefetchURLs:</TokenIdentifier>
<Abstract type="html">Assign list of URLs to let SDWebImagePrefetcher to queue the prefetching,
currently one image is downloaded at a time,
and skips images for failed downloads and proceed to the next image in the list</Abstract>
<DeclaredIn>SDWebImagePrefetcher.h</DeclaredIn>
<Declaration>- (void)prefetchURLs:(NSArray *)urls</Declaration>
<Parameters>
<Parameter>
<Name>urls</Name>
<Abstract type="html">list of URLs to prefetch</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/prefetchURLs:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDWebImagePrefetcher/prefetchURLs:completed:</TokenIdentifier>
<Abstract type="html">Assign list of URLs to let SDWebImagePrefetcher to queue the prefetching,
currently one image is downloaded at a time,
and skips images for failed downloads and proceed to the next image in the list</Abstract>
<DeclaredIn>SDWebImagePrefetcher.h</DeclaredIn>
<Declaration>- (void)prefetchURLs:(NSArray *)urls completed:(void ( ^ ) ( NSUInteger finishedCount , NSUInteger skippedCount ))completionBlock</Declaration>
<Parameters>
<Parameter>
<Name>urls</Name>
<Abstract type="html">list of URLs to prefetch</Abstract>
</Parameter><Parameter>
<Name>completionBlock</Name>
<Abstract type="html">block to be called when prefetching is completed</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/prefetchURLs:completed:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/instm/SDWebImagePrefetcher/cancelPrefetching</TokenIdentifier>
<Abstract type="html">Remove and cancel queued list</Abstract>
<DeclaredIn>SDWebImagePrefetcher.h</DeclaredIn>
<Declaration>- (void)cancelPrefetching</Declaration>
<Anchor>//api/name/cancelPrefetching</Anchor>
</Token>
</File>
</Tokens>

View File

@@ -0,0 +1,163 @@
<?xml version="1.0" encoding="UTF-8"?>
<Tokens version="1.0">
<File path="Categories/MKAnnotationView+WebCache.html">
<Token>
<TokenIdentifier>//apple_ref/occ/cat/MKAnnotationView(WebCache)</TokenIdentifier>
<Abstract type="html">Integrates SDWebImage async downloading and caching of remote images with MKAnnotationView.</Abstract>
<DeclaredIn>MKAnnotationView+WebCache.h</DeclaredIn>
<NodeRef refid="6"/>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/MKAnnotationView(WebCache)/setImageWithURL:</TokenIdentifier>
<Abstract type="html">Set the imageView image with an url.</Abstract>
<DeclaredIn>MKAnnotationView+WebCache.h</DeclaredIn>
<Declaration>- (void)setImageWithURL:(NSURL *)url</Declaration>
<Parameters>
<Parameter>
<Name>url</Name>
<Abstract type="html">The url for the image.</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/setImageWithURL:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/MKAnnotationView(WebCache)/setImageWithURL:placeholderImage:</TokenIdentifier>
<Abstract type="html">Set the imageView image with an url and a placeholder.</Abstract>
<DeclaredIn>MKAnnotationView+WebCache.h</DeclaredIn>
<RelatedTokens>
<TokenIdentifier>//apple_ref/occ/intfm/MKAnnotationView(WebCache)/setImageWithURL:placeholderImage:options:</TokenIdentifier>
</RelatedTokens>
<Declaration>- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder</Declaration>
<Parameters>
<Parameter>
<Name>url</Name>
<Abstract type="html">The url for the image.</Abstract>
</Parameter><Parameter>
<Name>placeholder</Name>
<Abstract type="html">The image to be set initially, until the image request finishes.</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/setImageWithURL:placeholderImage:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/MKAnnotationView(WebCache)/setImageWithURL:placeholderImage:options:</TokenIdentifier>
<Abstract type="html">Set the imageView image with an url, placeholder and custom options.</Abstract>
<DeclaredIn>MKAnnotationView+WebCache.h</DeclaredIn>
<Declaration>- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options</Declaration>
<Parameters>
<Parameter>
<Name>url</Name>
<Abstract type="html">The url for the image.</Abstract>
</Parameter><Parameter>
<Name>placeholder</Name>
<Abstract type="html">The image to be set initially, until the image request finishes.</Abstract>
</Parameter><Parameter>
<Name>options</Name>
<Abstract type="html">The options to use when downloading the image. @see SDWebImageOptions for the possible values.</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/setImageWithURL:placeholderImage:options:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/MKAnnotationView(WebCache)/setImageWithURL:completed:</TokenIdentifier>
<Abstract type="html">Set the imageView image with an url.</Abstract>
<DeclaredIn>MKAnnotationView+WebCache.h</DeclaredIn>
<Declaration>- (void)setImageWithURL:(NSURL *)url completed:(SDWebImageCompletedBlock)completedBlock</Declaration>
<Parameters>
<Parameter>
<Name>url</Name>
<Abstract type="html">The url for the image.</Abstract>
</Parameter><Parameter>
<Name>completedBlock</Name>
<Abstract type="html">A block called when operation has been completed. This block as no return value
and takes the requested UIImage as first parameter. In case of error the image parameter
is nil and the second parameter may contain an NSError. The third parameter is a Boolean
indicating if the image was retrived from the local cache of from the network.</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/setImageWithURL:completed:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/MKAnnotationView(WebCache)/setImageWithURL:placeholderImage:completed:</TokenIdentifier>
<Abstract type="html">Set the imageView image with an url, placeholder.</Abstract>
<DeclaredIn>MKAnnotationView+WebCache.h</DeclaredIn>
<Declaration>- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock</Declaration>
<Parameters>
<Parameter>
<Name>url</Name>
<Abstract type="html">The url for the image.</Abstract>
</Parameter><Parameter>
<Name>placeholder</Name>
<Abstract type="html">The image to be set initially, until the image request finishes.</Abstract>
</Parameter><Parameter>
<Name>completedBlock</Name>
<Abstract type="html">A block called when operation has been completed. This block as no return value
and takes the requested UIImage as first parameter. In case of error the image parameter
is nil and the second parameter may contain an NSError. The third parameter is a Boolean
indicating if the image was retrived from the local cache of from the network.</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/setImageWithURL:placeholderImage:completed:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/MKAnnotationView(WebCache)/setImageWithURL:placeholderImage:options:completed:</TokenIdentifier>
<Abstract type="html">Set the imageView image with an url, placeholder and custom options.</Abstract>
<DeclaredIn>MKAnnotationView+WebCache.h</DeclaredIn>
<Declaration>- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock</Declaration>
<Parameters>
<Parameter>
<Name>url</Name>
<Abstract type="html">The url for the image.</Abstract>
</Parameter><Parameter>
<Name>placeholder</Name>
<Abstract type="html">The image to be set initially, until the image request finishes.</Abstract>
</Parameter><Parameter>
<Name>options</Name>
<Abstract type="html">The options to use when downloading the image. @see SDWebImageOptions for the possible values.</Abstract>
</Parameter><Parameter>
<Name>completedBlock</Name>
<Abstract type="html">A block called when operation has been completed. This block as no return value
and takes the requested UIImage as first parameter. In case of error the image parameter
is nil and the second parameter may contain an NSError. The third parameter is a Boolean
indicating if the image was retrived from the local cache of from the network.</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/setImageWithURL:placeholderImage:options:completed:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/MKAnnotationView(WebCache)/cancelCurrentImageLoad</TokenIdentifier>
<Abstract type="html">Cancel the current download</Abstract>
<DeclaredIn>MKAnnotationView+WebCache.h</DeclaredIn>
<Declaration>- (void)cancelCurrentImageLoad</Declaration>
<Anchor>//api/name/cancelCurrentImageLoad</Anchor>
</Token>
</File>
</Tokens>

View File

@@ -0,0 +1,323 @@
<?xml version="1.0" encoding="UTF-8"?>
<Tokens version="1.0">
<File path="Categories/UIButton+WebCache.html">
<Token>
<TokenIdentifier>//apple_ref/occ/cat/UIButton(WebCache)</TokenIdentifier>
<Abstract type="html">Integrates SDWebImage async downloading and caching of remote images with UIButtonView.</Abstract>
<DeclaredIn>UIButton+WebCache.h</DeclaredIn>
<NodeRef refid="7"/>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/UIButton(WebCache)/setImageWithURL:forState:</TokenIdentifier>
<Abstract type="html">Set the imageView image with an url.</Abstract>
<DeclaredIn>UIButton+WebCache.h</DeclaredIn>
<Declaration>- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state</Declaration>
<Parameters>
<Parameter>
<Name>url</Name>
<Abstract type="html">The url for the image.</Abstract>
</Parameter><Parameter>
<Name>state</Name>
<Abstract type="html">The state that uses the specified title. The values are described in UIControlState.</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/setImageWithURL:forState:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/UIButton(WebCache)/setImageWithURL:forState:placeholderImage:</TokenIdentifier>
<Abstract type="html">Set the imageView image with an url and a placeholder.</Abstract>
<DeclaredIn>UIButton+WebCache.h</DeclaredIn>
<Declaration>- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder</Declaration>
<Parameters>
<Parameter>
<Name>url</Name>
<Abstract type="html">The url for the image.</Abstract>
</Parameter><Parameter>
<Name>state</Name>
<Abstract type="html">The state that uses the specified title. The values are described in UIControlState.</Abstract>
</Parameter><Parameter>
<Name>placeholder</Name>
<Abstract type="html">The image to be set initially, until the image request finishes.</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/setImageWithURL:forState:placeholderImage:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/UIButton(WebCache)/setImageWithURL:forState:placeholderImage:options:</TokenIdentifier>
<Abstract type="html">Set the imageView image with an url, placeholder and custom options.</Abstract>
<DeclaredIn>UIButton+WebCache.h</DeclaredIn>
<Declaration>- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options</Declaration>
<Parameters>
<Parameter>
<Name>url</Name>
<Abstract type="html">The url for the image.</Abstract>
</Parameter><Parameter>
<Name>state</Name>
<Abstract type="html">The state that uses the specified title. The values are described in UIControlState.</Abstract>
</Parameter><Parameter>
<Name>placeholder</Name>
<Abstract type="html">The image to be set initially, until the image request finishes.</Abstract>
</Parameter><Parameter>
<Name>options</Name>
<Abstract type="html">The options to use when downloading the image. @see SDWebImageOptions for the possible values.</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/setImageWithURL:forState:placeholderImage:options:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/UIButton(WebCache)/setImageWithURL:forState:completed:</TokenIdentifier>
<Abstract type="html">Set the imageView image with an url.</Abstract>
<DeclaredIn>UIButton+WebCache.h</DeclaredIn>
<Declaration>- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletedBlock)completedBlock</Declaration>
<Parameters>
<Parameter>
<Name>url</Name>
<Abstract type="html">The url for the image.</Abstract>
</Parameter><Parameter>
<Name>state</Name>
<Abstract type="html">The state that uses the specified title. The values are described in UIControlState.</Abstract>
</Parameter><Parameter>
<Name>completedBlock</Name>
<Abstract type="html">A block called when operation has been completed. This block as no return value
and takes the requested UIImage as first parameter. In case of error the image parameter
is nil and the second parameter may contain an NSError. The third parameter is a Boolean
indicating if the image was retrived from the local cache of from the network.</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/setImageWithURL:forState:completed:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/UIButton(WebCache)/setImageWithURL:forState:placeholderImage:completed:</TokenIdentifier>
<Abstract type="html">Set the imageView image with an url, placeholder.</Abstract>
<DeclaredIn>UIButton+WebCache.h</DeclaredIn>
<Declaration>- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock</Declaration>
<Parameters>
<Parameter>
<Name>url</Name>
<Abstract type="html">The url for the image.</Abstract>
</Parameter><Parameter>
<Name>state</Name>
<Abstract type="html">The state that uses the specified title. The values are described in UIControlState.</Abstract>
</Parameter><Parameter>
<Name>placeholder</Name>
<Abstract type="html">The image to be set initially, until the image request finishes.</Abstract>
</Parameter><Parameter>
<Name>completedBlock</Name>
<Abstract type="html">A block called when operation has been completed. This block as no return value
and takes the requested UIImage as first parameter. In case of error the image parameter
is nil and the second parameter may contain an NSError. The third parameter is a Boolean
indicating if the image was retrived from the local cache of from the network.</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/setImageWithURL:forState:placeholderImage:completed:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/UIButton(WebCache)/setImageWithURL:forState:placeholderImage:options:completed:</TokenIdentifier>
<Abstract type="html">Set the imageView image with an url, placeholder and custom options.</Abstract>
<DeclaredIn>UIButton+WebCache.h</DeclaredIn>
<Declaration>- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock</Declaration>
<Parameters>
<Parameter>
<Name>url</Name>
<Abstract type="html">The url for the image.</Abstract>
</Parameter><Parameter>
<Name>state</Name>
<Abstract type="html">The state that uses the specified title. The values are described in UIControlState.</Abstract>
</Parameter><Parameter>
<Name>placeholder</Name>
<Abstract type="html">The image to be set initially, until the image request finishes.</Abstract>
</Parameter><Parameter>
<Name>options</Name>
<Abstract type="html">The options to use when downloading the image. @see SDWebImageOptions for the possible values.</Abstract>
</Parameter><Parameter>
<Name>completedBlock</Name>
<Abstract type="html">A block called when operation has been completed. This block as no return value
and takes the requested UIImage as first parameter. In case of error the image parameter
is nil and the second parameter may contain an NSError. The third parameter is a Boolean
indicating if the image was retrived from the local cache of from the network.</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/setImageWithURL:forState:placeholderImage:options:completed:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/UIButton(WebCache)/setBackgroundImageWithURL:forState:</TokenIdentifier>
<Abstract type="html">Set the backgroundImageView image with an url.</Abstract>
<DeclaredIn>UIButton+WebCache.h</DeclaredIn>
<Declaration>- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state</Declaration>
<Parameters>
<Parameter>
<Name>url</Name>
<Abstract type="html">The url for the image.</Abstract>
</Parameter><Parameter>
<Name>state</Name>
<Abstract type="html">The state that uses the specified title. The values are described in UIControlState.</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/setBackgroundImageWithURL:forState:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/UIButton(WebCache)/setBackgroundImageWithURL:forState:placeholderImage:</TokenIdentifier>
<Abstract type="html">Set the backgroundImageView image with an url and a placeholder.</Abstract>
<DeclaredIn>UIButton+WebCache.h</DeclaredIn>
<Declaration>- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder</Declaration>
<Parameters>
<Parameter>
<Name>url</Name>
<Abstract type="html">The url for the image.</Abstract>
</Parameter><Parameter>
<Name>state</Name>
<Abstract type="html">The state that uses the specified title. The values are described in UIControlState.</Abstract>
</Parameter><Parameter>
<Name>placeholder</Name>
<Abstract type="html">The image to be set initially, until the image request finishes.</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/setBackgroundImageWithURL:forState:placeholderImage:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/UIButton(WebCache)/setBackgroundImageWithURL:forState:placeholderImage:options:</TokenIdentifier>
<Abstract type="html">Set the backgroundImageView image with an url, placeholder and custom options.</Abstract>
<DeclaredIn>UIButton+WebCache.h</DeclaredIn>
<Declaration>- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options</Declaration>
<Parameters>
<Parameter>
<Name>url</Name>
<Abstract type="html">The url for the image.</Abstract>
</Parameter><Parameter>
<Name>state</Name>
<Abstract type="html">The state that uses the specified title. The values are described in UIControlState.</Abstract>
</Parameter><Parameter>
<Name>placeholder</Name>
<Abstract type="html">The image to be set initially, until the image request finishes.</Abstract>
</Parameter><Parameter>
<Name>options</Name>
<Abstract type="html">The options to use when downloading the image. @see SDWebImageOptions for the possible values.</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/setBackgroundImageWithURL:forState:placeholderImage:options:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/UIButton(WebCache)/setBackgroundImageWithURL:forState:completed:</TokenIdentifier>
<Abstract type="html">Set the backgroundImageView image with an url.</Abstract>
<DeclaredIn>UIButton+WebCache.h</DeclaredIn>
<Declaration>- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletedBlock)completedBlock</Declaration>
<Parameters>
<Parameter>
<Name>url</Name>
<Abstract type="html">The url for the image.</Abstract>
</Parameter><Parameter>
<Name>state</Name>
<Abstract type="html">The state that uses the specified title. The values are described in UIControlState.</Abstract>
</Parameter><Parameter>
<Name>success</Name>
<Abstract type="html">A block to be executed when the image request succeed This block has no return value and takes the retrieved image as argument.</Abstract>
</Parameter><Parameter>
<Name>failure</Name>
<Abstract type="html">A block object to be executed when the image request failed. This block has no return value and takes the error object describing the network or parsing error that occurred (may be nil).</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/setBackgroundImageWithURL:forState:completed:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/UIButton(WebCache)/setBackgroundImageWithURL:forState:placeholderImage:completed:</TokenIdentifier>
<Abstract type="html">Set the backgroundImageView image with an url, placeholder.</Abstract>
<DeclaredIn>UIButton+WebCache.h</DeclaredIn>
<Declaration>- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock</Declaration>
<Parameters>
<Parameter>
<Name>url</Name>
<Abstract type="html">The url for the image.</Abstract>
</Parameter><Parameter>
<Name>state</Name>
<Abstract type="html">The state that uses the specified title. The values are described in UIControlState.</Abstract>
</Parameter><Parameter>
<Name>placeholder</Name>
<Abstract type="html">The image to be set initially, until the image request finishes.</Abstract>
</Parameter><Parameter>
<Name>success</Name>
<Abstract type="html">A block to be executed when the image request succeed This block has no return value and takes the retrieved image as argument.</Abstract>
</Parameter><Parameter>
<Name>failure</Name>
<Abstract type="html">A block object to be executed when the image request failed. This block has no return value and takes the error object describing the network or parsing error that occurred (may be nil).</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/setBackgroundImageWithURL:forState:placeholderImage:completed:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/UIButton(WebCache)/setBackgroundImageWithURL:forState:placeholderImage:options:completed:</TokenIdentifier>
<Abstract type="html">Set the backgroundImageView image with an url, placeholder and custom options.</Abstract>
<DeclaredIn>UIButton+WebCache.h</DeclaredIn>
<Declaration>- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock</Declaration>
<Parameters>
<Parameter>
<Name>url</Name>
<Abstract type="html">The url for the image.</Abstract>
</Parameter><Parameter>
<Name>placeholder</Name>
<Abstract type="html">The image to be set initially, until the image request finishes.</Abstract>
</Parameter><Parameter>
<Name>options</Name>
<Abstract type="html">The options to use when downloading the image. @see SDWebImageOptions for the possible values.</Abstract>
</Parameter><Parameter>
<Name>success</Name>
<Abstract type="html">A block to be executed when the image request succeed This block has no return value and takes the retrieved image as argument.</Abstract>
</Parameter><Parameter>
<Name>failure</Name>
<Abstract type="html">A block object to be executed when the image request failed. This block has no return value and takes the error object describing the network or parsing error that occurred (may be nil).</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/setBackgroundImageWithURL:forState:placeholderImage:options:completed:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/UIButton(WebCache)/cancelCurrentImageLoad</TokenIdentifier>
<Abstract type="html">Cancel the current download</Abstract>
<DeclaredIn>UIButton+WebCache.h</DeclaredIn>
<Declaration>- (void)cancelCurrentImageLoad</Declaration>
<Anchor>//api/name/cancelCurrentImageLoad</Anchor>
</Token>
</File>
</Tokens>

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<Tokens version="1.0">
<File path="Categories/UIImage+ForceDecode.html">
<Token>
<TokenIdentifier>//apple_ref/occ/cat/UIImage(ForceDecode)</TokenIdentifier>
<Abstract type="html"></Abstract>
<DeclaredIn>SDWebImageDecoder.h</DeclaredIn>
<NodeRef refid="8"/>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/UIImage(ForceDecode)/decodedImageWithImage:</TokenIdentifier>
<Abstract type="html"></Abstract>
<DeclaredIn>SDWebImageDecoder.h</DeclaredIn>
<Declaration>+ (UIImage *)decodedImageWithImage:(UIImage *)image</Declaration>
<Anchor>//api/name/decodedImageWithImage:</Anchor>
</Token>
</File>
</Tokens>

View File

@@ -0,0 +1,194 @@
<?xml version="1.0" encoding="UTF-8"?>
<Tokens version="1.0">
<File path="Categories/UIImageView+WebCache.html">
<Token>
<TokenIdentifier>//apple_ref/occ/cat/UIImageView(WebCache)</TokenIdentifier>
<Abstract type="html">Integrates SDWebImage async downloading and caching of remote images with UIImageView.</Abstract>
<DeclaredIn>UIImageView+WebCache.h</DeclaredIn>
<NodeRef refid="9"/>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/UIImageView(WebCache)/setImageWithURL:</TokenIdentifier>
<Abstract type="html">Set the imageView image with an url.</Abstract>
<DeclaredIn>UIImageView+WebCache.h</DeclaredIn>
<Declaration>- (void)setImageWithURL:(NSURL *)url</Declaration>
<Parameters>
<Parameter>
<Name>url</Name>
<Abstract type="html">The url for the image.</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/setImageWithURL:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/UIImageView(WebCache)/setImageWithURL:placeholderImage:</TokenIdentifier>
<Abstract type="html">Set the imageView image with an url and a placeholder.</Abstract>
<DeclaredIn>UIImageView+WebCache.h</DeclaredIn>
<RelatedTokens>
<TokenIdentifier>//apple_ref/occ/intfm/UIImageView(WebCache)/setImageWithURL:placeholderImage:options:</TokenIdentifier>
</RelatedTokens>
<Declaration>- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder</Declaration>
<Parameters>
<Parameter>
<Name>url</Name>
<Abstract type="html">The url for the image.</Abstract>
</Parameter><Parameter>
<Name>placeholder</Name>
<Abstract type="html">The image to be set initially, until the image request finishes.</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/setImageWithURL:placeholderImage:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/UIImageView(WebCache)/setImageWithURL:placeholderImage:options:</TokenIdentifier>
<Abstract type="html">Set the imageView image with an url, placeholder and custom options.</Abstract>
<DeclaredIn>UIImageView+WebCache.h</DeclaredIn>
<Declaration>- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options</Declaration>
<Parameters>
<Parameter>
<Name>url</Name>
<Abstract type="html">The url for the image.</Abstract>
</Parameter><Parameter>
<Name>placeholder</Name>
<Abstract type="html">The image to be set initially, until the image request finishes.</Abstract>
</Parameter><Parameter>
<Name>options</Name>
<Abstract type="html">The options to use when downloading the image. @see SDWebImageOptions for the possible values.</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/setImageWithURL:placeholderImage:options:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/UIImageView(WebCache)/setImageWithURL:completed:</TokenIdentifier>
<Abstract type="html">Set the imageView image with an url.</Abstract>
<DeclaredIn>UIImageView+WebCache.h</DeclaredIn>
<Declaration>- (void)setImageWithURL:(NSURL *)url completed:(SDWebImageCompletedBlock)completedBlock</Declaration>
<Parameters>
<Parameter>
<Name>url</Name>
<Abstract type="html">The url for the image.</Abstract>
</Parameter><Parameter>
<Name>completedBlock</Name>
<Abstract type="html">A block called when operation has been completed. This block as no return value
and takes the requested UIImage as first parameter. In case of error the image parameter
is nil and the second parameter may contain an NSError. The third parameter is a Boolean
indicating if the image was retrived from the local cache of from the network.</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/setImageWithURL:completed:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/UIImageView(WebCache)/setImageWithURL:placeholderImage:completed:</TokenIdentifier>
<Abstract type="html">Set the imageView image with an url, placeholder.</Abstract>
<DeclaredIn>UIImageView+WebCache.h</DeclaredIn>
<Declaration>- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock</Declaration>
<Parameters>
<Parameter>
<Name>url</Name>
<Abstract type="html">The url for the image.</Abstract>
</Parameter><Parameter>
<Name>placeholder</Name>
<Abstract type="html">The image to be set initially, until the image request finishes.</Abstract>
</Parameter><Parameter>
<Name>completedBlock</Name>
<Abstract type="html">A block called when operation has been completed. This block as no return value
and takes the requested UIImage as first parameter. In case of error the image parameter
is nil and the second parameter may contain an NSError. The third parameter is a Boolean
indicating if the image was retrived from the local cache of from the network.</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/setImageWithURL:placeholderImage:completed:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/UIImageView(WebCache)/setImageWithURL:placeholderImage:options:completed:</TokenIdentifier>
<Abstract type="html">Set the imageView image with an url, placeholder and custom options.</Abstract>
<DeclaredIn>UIImageView+WebCache.h</DeclaredIn>
<Declaration>- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock</Declaration>
<Parameters>
<Parameter>
<Name>url</Name>
<Abstract type="html">The url for the image.</Abstract>
</Parameter><Parameter>
<Name>placeholder</Name>
<Abstract type="html">The image to be set initially, until the image request finishes.</Abstract>
</Parameter><Parameter>
<Name>options</Name>
<Abstract type="html">The options to use when downloading the image. @see SDWebImageOptions for the possible values.</Abstract>
</Parameter><Parameter>
<Name>completedBlock</Name>
<Abstract type="html">A block called when operation has been completed. This block as no return value
and takes the requested UIImage as first parameter. In case of error the image parameter
is nil and the second parameter may contain an NSError. The third parameter is a Boolean
indicating if the image was retrived from the local cache of from the network.</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/setImageWithURL:placeholderImage:options:completed:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/UIImageView(WebCache)/setImageWithURL:placeholderImage:options:progress:completed:</TokenIdentifier>
<Abstract type="html">Set the imageView image with an url, placeholder and custom options.</Abstract>
<DeclaredIn>UIImageView+WebCache.h</DeclaredIn>
<Declaration>- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletedBlock)completedBlock</Declaration>
<Parameters>
<Parameter>
<Name>url</Name>
<Abstract type="html">The url for the image.</Abstract>
</Parameter><Parameter>
<Name>placeholder</Name>
<Abstract type="html">The image to be set initially, until the image request finishes.</Abstract>
</Parameter><Parameter>
<Name>options</Name>
<Abstract type="html">The options to use when downloading the image. @see SDWebImageOptions for the possible values.</Abstract>
</Parameter><Parameter>
<Name>progressBlock</Name>
<Abstract type="html">A block called while image is downloading</Abstract>
</Parameter><Parameter>
<Name>completedBlock</Name>
<Abstract type="html">A block called when operation has been completed. This block as no return value
and takes the requested UIImage as first parameter. In case of error the image parameter
is nil and the second parameter may contain an NSError. The third parameter is a Boolean
indicating if the image was retrived from the local cache of from the network.</Abstract>
</Parameter>
</Parameters>
<Anchor>//api/name/setImageWithURL:placeholderImage:options:progress:completed:</Anchor>
</Token>
<Token>
<TokenIdentifier>//apple_ref/occ/intfm/UIImageView(WebCache)/cancelCurrentImageLoad</TokenIdentifier>
<Abstract type="html">Cancel the current download</Abstract>
<DeclaredIn>UIImageView+WebCache.h</DeclaredIn>
<Declaration>- (void)cancelCurrentImageLoad</Declaration>
<Anchor>//api/name/cancelCurrentImageLoad</Anchor>
</Token>
</File>
</Tokens>

View File

@@ -0,0 +1,754 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
<title>MKAnnotationView(WebCache) Category Reference</title>
<meta id="xcode-display" name="xcode-display" content="render"/>
<meta name="viewport" content="width=550" />
<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
<meta name="generator" content="appledoc 2.1 (build 840)" />
</head>
<body>
<header id="top_header">
<div id="library" class="hideInXcode">
<h1><a id="libraryTitle" href="../index.html">SDWebImage 3.2 </a></h1>
<a id="developerHome" href="../index.html">Olivier Poitrey</a>
</div>
<div id="title" role="banner">
<h1 class="hideInXcode">MKAnnotationView(WebCache) Category Reference</h1>
</div>
<ul id="headerButtons" role="toolbar">
<li id="toc_button">
<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
</li>
<li id="jumpto_button" role="navigation">
<select id="jumpTo">
<option value="top">Jump To&#133;</option>
<option value="overview">Overview</option>
<option value="tasks">Tasks</option>
<option value="instance_methods">Instance Methods</option>
<option value="//api/name/cancelCurrentImageLoad">&nbsp;&nbsp;&nbsp;&nbsp;- cancelCurrentImageLoad</option>
<option value="//api/name/setImageWithURL:">&nbsp;&nbsp;&nbsp;&nbsp;- setImageWithURL:</option>
<option value="//api/name/setImageWithURL:completed:">&nbsp;&nbsp;&nbsp;&nbsp;- setImageWithURL:completed:</option>
<option value="//api/name/setImageWithURL:placeholderImage:">&nbsp;&nbsp;&nbsp;&nbsp;- setImageWithURL:placeholderImage:</option>
<option value="//api/name/setImageWithURL:placeholderImage:completed:">&nbsp;&nbsp;&nbsp;&nbsp;- setImageWithURL:placeholderImage:completed:</option>
<option value="//api/name/setImageWithURL:placeholderImage:options:">&nbsp;&nbsp;&nbsp;&nbsp;- setImageWithURL:placeholderImage:options:</option>
<option value="//api/name/setImageWithURL:placeholderImage:options:completed:">&nbsp;&nbsp;&nbsp;&nbsp;- setImageWithURL:placeholderImage:options:completed:</option>
</select>
</li>
</ul>
</header>
<nav id="tocContainer" class="isShowingTOC">
<ul id="toc" role="tree">
<li role="treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#overview">Overview</a></span></li>
<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#instance_methods">Instance Methods</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/cancelCurrentImageLoad">cancelCurrentImageLoad</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setImageWithURL:">setImageWithURL:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setImageWithURL:completed:">setImageWithURL:completed:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setImageWithURL:placeholderImage:">setImageWithURL:placeholderImage:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setImageWithURL:placeholderImage:completed:">setImageWithURL:placeholderImage:completed:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setImageWithURL:placeholderImage:options:">setImageWithURL:placeholderImage:options:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setImageWithURL:placeholderImage:options:completed:">setImageWithURL:placeholderImage:options:completed:</a></span></li>
</ul></li>
</ul>
</nav>
<article>
<div id="contents" class="isShowingTOC" role="main">
<a title="MKAnnotationView(WebCache) Category Reference" name="top"></a>
<div class="main-navigation navigation-top">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="header">
<div class="section-header">
<h1 class="title title-header">MKAnnotationView(WebCache) Category Reference</h1>
</div>
</div>
<div id="container">
<div class="section section-specification"><table cellspacing="0"><tbody>
<tr>
<td class="specification-title">Declared in</td>
<td class="specification-value">MKAnnotationView+WebCache.h</td>
</tr>
</tbody></table></div>
<div class="section section-overview">
<a title="Overview" name="overview"></a>
<h2 class="subtitle subtitle-overview">Overview</h2>
<p>Integrates SDWebImage async downloading and caching of remote images with MKAnnotationView.</p>
</div>
<div class="section section-tasks">
<a title="Tasks" name="tasks"></a>
<h2 class="subtitle subtitle-tasks">Tasks</h2>
<ul class="task-list">
<li>
<span class="tooltip">
<code><a href="#//api/name/setImageWithURL:">&ndash;&nbsp;setImageWithURL:</a></code>
<span class="tooltip"><p>Set the imageView <code>image</code> with an <code>url</code>.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/setImageWithURL:placeholderImage:">&ndash;&nbsp;setImageWithURL:placeholderImage:</a></code>
<span class="tooltip"><p>Set the imageView <code>image</code> with an <code>url</code> and a placeholder.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/setImageWithURL:placeholderImage:options:">&ndash;&nbsp;setImageWithURL:placeholderImage:options:</a></code>
<span class="tooltip"><p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/setImageWithURL:completed:">&ndash;&nbsp;setImageWithURL:completed:</a></code>
<span class="tooltip"><p>Set the imageView <code>image</code> with an <code>url</code>.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/setImageWithURL:placeholderImage:completed:">&ndash;&nbsp;setImageWithURL:placeholderImage:completed:</a></code>
<span class="tooltip"><p>Set the imageView <code>image</code> with an <code>url</code>, placeholder.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/setImageWithURL:placeholderImage:options:completed:">&ndash;&nbsp;setImageWithURL:placeholderImage:options:completed:</a></code>
<span class="tooltip"><p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/cancelCurrentImageLoad">&ndash;&nbsp;cancelCurrentImageLoad</a></code>
<span class="tooltip"><p>Cancel the current download</p></span>
</span>
</li>
</ul>
</div>
<div class="section section-methods">
<a title="Instance Methods" name="instance_methods"></a>
<h2 class="subtitle subtitle-methods">Instance Methods</h2>
<div class="section-method">
<a name="//api/name/cancelCurrentImageLoad" title="cancelCurrentImageLoad"></a>
<h3 class="subsubtitle method-title">cancelCurrentImageLoad</h3>
<div class="method-subsection brief-description">
<p>Cancel the current download</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)cancelCurrentImageLoad</code></div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Cancel the current download</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">MKAnnotationView+WebCache.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/setImageWithURL:" title="setImageWithURL:"></a>
<h3 class="subsubtitle method-title">setImageWithURL:</h3>
<div class="method-subsection brief-description">
<p>Set the imageView <code>image</code> with an <code>url</code>.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setImageWithURL:(NSURL *)<em>url</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The url for the image.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Set the imageView <code>image</code> with an <code>url</code>.</p>
<p>The downloand is asynchronous and cached.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">MKAnnotationView+WebCache.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/setImageWithURL:completed:" title="setImageWithURL:completed:"></a>
<h3 class="subsubtitle method-title">setImageWithURL:completed:</h3>
<div class="method-subsection brief-description">
<p>Set the imageView <code>image</code> with an <code>url</code>.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setImageWithURL:(NSURL *)<em>url</em> completed:(SDWebImageCompletedBlock)<em>completedBlock</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The url for the image.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>completedBlock</em></dt>
<dd><p>A block called when operation has been completed. This block as no return value
and takes the requested UIImage as first parameter. In case of error the image parameter
is nil and the second parameter may contain an NSError. The third parameter is a Boolean
indicating if the image was retrived from the local cache of from the network.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Set the imageView <code>image</code> with an <code>url</code>.</p>
<p>The downloand is asynchronous and cached.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">MKAnnotationView+WebCache.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/setImageWithURL:placeholderImage:" title="setImageWithURL:placeholderImage:"></a>
<h3 class="subsubtitle method-title">setImageWithURL:placeholderImage:</h3>
<div class="method-subsection brief-description">
<p>Set the imageView <code>image</code> with an <code>url</code> and a placeholder.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setImageWithURL:(NSURL *)<em>url</em> placeholderImage:(UIImage *)<em>placeholder</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The url for the image.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>placeholder</em></dt>
<dd><p>The image to be set initially, until the image request finishes.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Set the imageView <code>image</code> with an <code>url</code> and a placeholder.</p>
<p>The downloand is asynchronous and cached.</p>
</div>
<div class="method-subsection see-also-section">
<h4 class="method-subtitle">See Also</h4>
<ul>
<li><code><p><a href="#//api/name/setImageWithURL:placeholderImage:options:">&ndash; setImageWithURL:placeholderImage:options:</a></p></code></li>
</ul>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">MKAnnotationView+WebCache.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/setImageWithURL:placeholderImage:completed:" title="setImageWithURL:placeholderImage:completed:"></a>
<h3 class="subsubtitle method-title">setImageWithURL:placeholderImage:completed:</h3>
<div class="method-subsection brief-description">
<p>Set the imageView <code>image</code> with an <code>url</code>, placeholder.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setImageWithURL:(NSURL *)<em>url</em> placeholderImage:(UIImage *)<em>placeholder</em> completed:(SDWebImageCompletedBlock)<em>completedBlock</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The url for the image.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>placeholder</em></dt>
<dd><p>The image to be set initially, until the image request finishes.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>completedBlock</em></dt>
<dd><p>A block called when operation has been completed. This block as no return value
and takes the requested UIImage as first parameter. In case of error the image parameter
is nil and the second parameter may contain an NSError. The third parameter is a Boolean
indicating if the image was retrived from the local cache of from the network.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Set the imageView <code>image</code> with an <code>url</code>, placeholder.</p>
<p>The downloand is asynchronous and cached.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">MKAnnotationView+WebCache.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/setImageWithURL:placeholderImage:options:" title="setImageWithURL:placeholderImage:options:"></a>
<h3 class="subsubtitle method-title">setImageWithURL:placeholderImage:options:</h3>
<div class="method-subsection brief-description">
<p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setImageWithURL:(NSURL *)<em>url</em> placeholderImage:(UIImage *)<em>placeholder</em> options:(SDWebImageOptions)<em>options</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The url for the image.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>placeholder</em></dt>
<dd><p>The image to be set initially, until the image request finishes.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>options</em></dt>
<dd><p>The options to use when downloading the image. @see SDWebImageOptions for the possible values.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p>
<p>The downloand is asynchronous and cached.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">MKAnnotationView+WebCache.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/setImageWithURL:placeholderImage:options:completed:" title="setImageWithURL:placeholderImage:options:completed:"></a>
<h3 class="subsubtitle method-title">setImageWithURL:placeholderImage:options:completed:</h3>
<div class="method-subsection brief-description">
<p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setImageWithURL:(NSURL *)<em>url</em> placeholderImage:(UIImage *)<em>placeholder</em> options:(SDWebImageOptions)<em>options</em> completed:(SDWebImageCompletedBlock)<em>completedBlock</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The url for the image.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>placeholder</em></dt>
<dd><p>The image to be set initially, until the image request finishes.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>options</em></dt>
<dd><p>The options to use when downloading the image. @see SDWebImageOptions for the possible values.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>completedBlock</em></dt>
<dd><p>A block called when operation has been completed. This block as no return value
and takes the requested UIImage as first parameter. In case of error the image parameter
is nil and the second parameter may contain an NSError. The third parameter is a Boolean
indicating if the image was retrived from the local cache of from the network.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p>
<p>The downloand is asynchronous and cached.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">MKAnnotationView+WebCache.h</code><br />
</div>
</div>
</div>
</div>
<div class="main-navigation navigation-bottom">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2013 Olivier Poitrey. All rights reserved. (Last updated: 2013-04-02)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.1 (build 840)</a>.</span></p>
</div>
</div>
</div>
</article>
<script type="text/javascript">
function jumpToChange()
{
window.location.hash = this.options[this.selectedIndex].value;
}
function toggleTOC()
{
var contents = document.getElementById('contents');
var tocContainer = document.getElementById('tocContainer');
if (this.getAttribute('class') == 'open')
{
this.setAttribute('class', '');
contents.setAttribute('class', '');
tocContainer.setAttribute('class', '');
window.name = "hideTOC";
}
else
{
this.setAttribute('class', 'open');
contents.setAttribute('class', 'isShowingTOC');
tocContainer.setAttribute('class', 'isShowingTOC');
window.name = "";
}
return false;
}
function toggleTOCEntryChildren(e)
{
e.stopPropagation();
var currentClass = this.getAttribute('class');
if (currentClass == 'children') {
this.setAttribute('class', 'children open');
}
else if (currentClass == 'children open') {
this.setAttribute('class', 'children');
}
return false;
}
function tocEntryClick(e)
{
e.stopPropagation();
return true;
}
function init()
{
var selectElement = document.getElementById('jumpTo');
selectElement.addEventListener('change', jumpToChange, false);
var tocButton = document.getElementById('table_of_contents');
tocButton.addEventListener('click', toggleTOC, false);
var taskTreeItem = document.getElementById('task_treeitem');
if (taskTreeItem.getElementsByTagName('li').length > 0)
{
taskTreeItem.setAttribute('class', 'children');
taskTreeItem.firstChild.setAttribute('class', 'disclosure');
}
var tocList = document.getElementById('toc');
var tocEntries = tocList.getElementsByTagName('li');
for (var i = 0; i < tocEntries.length; i++) {
tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
}
var tocLinks = tocList.getElementsByTagName('a');
for (var i = 0; i < tocLinks.length; i++) {
tocLinks[i].addEventListener('click', tocEntryClick, false);
}
if (window.name == "hideTOC") {
toggleTOC.call(tocButton);
}
}
window.onload = init;
// If showing in Xcode, hide the TOC and Header
if (navigator.userAgent.match(/xcode/i)) {
document.getElementById("contents").className = "hideInXcode"
document.getElementById("tocContainer").className = "hideInXcode"
document.getElementById("top_header").className = "hideInXcode"
}
</script>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,265 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
<title>UIImage(ForceDecode) Category Reference</title>
<meta id="xcode-display" name="xcode-display" content="render"/>
<meta name="viewport" content="width=550" />
<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
<meta name="generator" content="appledoc 2.1 (build 840)" />
</head>
<body>
<header id="top_header">
<div id="library" class="hideInXcode">
<h1><a id="libraryTitle" href="../index.html">SDWebImage 3.2 </a></h1>
<a id="developerHome" href="../index.html">Olivier Poitrey</a>
</div>
<div id="title" role="banner">
<h1 class="hideInXcode">UIImage(ForceDecode) Category Reference</h1>
</div>
<ul id="headerButtons" role="toolbar">
<li id="toc_button">
<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
</li>
<li id="jumpto_button" role="navigation">
<select id="jumpTo">
<option value="top">Jump To&#133;</option>
<option value="tasks">Tasks</option>
<option value="class_methods">Class Methods</option>
<option value="//api/name/decodedImageWithImage:">&nbsp;&nbsp;&nbsp;&nbsp;+ decodedImageWithImage:</option>
</select>
</li>
</ul>
</header>
<nav id="tocContainer" class="isShowingTOC">
<ul id="toc" role="tree">
<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#class_methods">Class Methods</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/decodedImageWithImage:">decodedImageWithImage:</a></span></li>
</ul></li>
</ul>
</nav>
<article>
<div id="contents" class="isShowingTOC" role="main">
<a title="UIImage(ForceDecode) Category Reference" name="top"></a>
<div class="main-navigation navigation-top">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="header">
<div class="section-header">
<h1 class="title title-header">UIImage(ForceDecode) Category Reference</h1>
</div>
</div>
<div id="container">
<div class="section section-specification"><table cellspacing="0"><tbody>
<tr>
<td class="specification-title">Declared in</td>
<td class="specification-value">SDWebImageDecoder.h</td>
</tr>
</tbody></table></div>
<div class="section section-tasks">
<a title="Tasks" name="tasks"></a>
<h2 class="subtitle subtitle-tasks">Tasks</h2>
<ul class="task-list">
<li>
<span class="tooltip">
<code><a href="#//api/name/decodedImageWithImage:">+&nbsp;decodedImageWithImage:</a></code>
</span>
</li>
</ul>
</div>
<div class="section section-methods">
<a title="Class Methods" name="class_methods"></a>
<h2 class="subtitle subtitle-methods">Class Methods</h2>
<div class="section-method">
<a name="//api/name/decodedImageWithImage:" title="decodedImageWithImage:"></a>
<h3 class="subsubtitle method-title">decodedImageWithImage:</h3>
<div class="method-subsection method-declaration"><code>+ (UIImage *)decodedImageWithImage:(UIImage *)<em>image</em></code></div>
</div>
</div>
</div>
<div class="main-navigation navigation-bottom">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2013 Olivier Poitrey. All rights reserved. (Last updated: 2013-04-02)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.1 (build 840)</a>.</span></p>
</div>
</div>
</div>
</article>
<script type="text/javascript">
function jumpToChange()
{
window.location.hash = this.options[this.selectedIndex].value;
}
function toggleTOC()
{
var contents = document.getElementById('contents');
var tocContainer = document.getElementById('tocContainer');
if (this.getAttribute('class') == 'open')
{
this.setAttribute('class', '');
contents.setAttribute('class', '');
tocContainer.setAttribute('class', '');
window.name = "hideTOC";
}
else
{
this.setAttribute('class', 'open');
contents.setAttribute('class', 'isShowingTOC');
tocContainer.setAttribute('class', 'isShowingTOC');
window.name = "";
}
return false;
}
function toggleTOCEntryChildren(e)
{
e.stopPropagation();
var currentClass = this.getAttribute('class');
if (currentClass == 'children') {
this.setAttribute('class', 'children open');
}
else if (currentClass == 'children open') {
this.setAttribute('class', 'children');
}
return false;
}
function tocEntryClick(e)
{
e.stopPropagation();
return true;
}
function init()
{
var selectElement = document.getElementById('jumpTo');
selectElement.addEventListener('change', jumpToChange, false);
var tocButton = document.getElementById('table_of_contents');
tocButton.addEventListener('click', toggleTOC, false);
var taskTreeItem = document.getElementById('task_treeitem');
if (taskTreeItem.getElementsByTagName('li').length > 0)
{
taskTreeItem.setAttribute('class', 'children');
taskTreeItem.firstChild.setAttribute('class', 'disclosure');
}
var tocList = document.getElementById('toc');
var tocEntries = tocList.getElementsByTagName('li');
for (var i = 0; i < tocEntries.length; i++) {
tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
}
var tocLinks = tocList.getElementsByTagName('a');
for (var i = 0; i < tocLinks.length; i++) {
tocLinks[i].addEventListener('click', tocEntryClick, false);
}
if (window.name == "hideTOC") {
toggleTOC.call(tocButton);
}
}
window.onload = init;
// If showing in Xcode, hide the TOC and Header
if (navigator.userAgent.match(/xcode/i)) {
document.getElementById("contents").className = "hideInXcode"
document.getElementById("tocContainer").className = "hideInXcode"
document.getElementById("top_header").className = "hideInXcode"
}
</script>
</body>
</html>

View File

@@ -0,0 +1,870 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
<title>UIImageView(WebCache) Category Reference</title>
<meta id="xcode-display" name="xcode-display" content="render"/>
<meta name="viewport" content="width=550" />
<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
<meta name="generator" content="appledoc 2.1 (build 840)" />
</head>
<body>
<header id="top_header">
<div id="library" class="hideInXcode">
<h1><a id="libraryTitle" href="../index.html">SDWebImage 3.2 </a></h1>
<a id="developerHome" href="../index.html">Olivier Poitrey</a>
</div>
<div id="title" role="banner">
<h1 class="hideInXcode">UIImageView(WebCache) Category Reference</h1>
</div>
<ul id="headerButtons" role="toolbar">
<li id="toc_button">
<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
</li>
<li id="jumpto_button" role="navigation">
<select id="jumpTo">
<option value="top">Jump To&#133;</option>
<option value="overview">Overview</option>
<option value="tasks">Tasks</option>
<option value="instance_methods">Instance Methods</option>
<option value="//api/name/cancelCurrentImageLoad">&nbsp;&nbsp;&nbsp;&nbsp;- cancelCurrentImageLoad</option>
<option value="//api/name/setImageWithURL:">&nbsp;&nbsp;&nbsp;&nbsp;- setImageWithURL:</option>
<option value="//api/name/setImageWithURL:completed:">&nbsp;&nbsp;&nbsp;&nbsp;- setImageWithURL:completed:</option>
<option value="//api/name/setImageWithURL:placeholderImage:">&nbsp;&nbsp;&nbsp;&nbsp;- setImageWithURL:placeholderImage:</option>
<option value="//api/name/setImageWithURL:placeholderImage:completed:">&nbsp;&nbsp;&nbsp;&nbsp;- setImageWithURL:placeholderImage:completed:</option>
<option value="//api/name/setImageWithURL:placeholderImage:options:">&nbsp;&nbsp;&nbsp;&nbsp;- setImageWithURL:placeholderImage:options:</option>
<option value="//api/name/setImageWithURL:placeholderImage:options:completed:">&nbsp;&nbsp;&nbsp;&nbsp;- setImageWithURL:placeholderImage:options:completed:</option>
<option value="//api/name/setImageWithURL:placeholderImage:options:progress:completed:">&nbsp;&nbsp;&nbsp;&nbsp;- setImageWithURL:placeholderImage:options:progress:completed:</option>
</select>
</li>
</ul>
</header>
<nav id="tocContainer" class="isShowingTOC">
<ul id="toc" role="tree">
<li role="treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#overview">Overview</a></span></li>
<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#instance_methods">Instance Methods</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/cancelCurrentImageLoad">cancelCurrentImageLoad</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setImageWithURL:">setImageWithURL:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setImageWithURL:completed:">setImageWithURL:completed:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setImageWithURL:placeholderImage:">setImageWithURL:placeholderImage:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setImageWithURL:placeholderImage:completed:">setImageWithURL:placeholderImage:completed:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setImageWithURL:placeholderImage:options:">setImageWithURL:placeholderImage:options:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setImageWithURL:placeholderImage:options:completed:">setImageWithURL:placeholderImage:options:completed:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setImageWithURL:placeholderImage:options:progress:completed:">setImageWithURL:placeholderImage:options:progress:completed:</a></span></li>
</ul></li>
</ul>
</nav>
<article>
<div id="contents" class="isShowingTOC" role="main">
<a title="UIImageView(WebCache) Category Reference" name="top"></a>
<div class="main-navigation navigation-top">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="header">
<div class="section-header">
<h1 class="title title-header">UIImageView(WebCache) Category Reference</h1>
</div>
</div>
<div id="container">
<div class="section section-specification"><table cellspacing="0"><tbody>
<tr>
<td class="specification-title">Declared in</td>
<td class="specification-value">UIImageView+WebCache.h</td>
</tr>
</tbody></table></div>
<div class="section section-overview">
<a title="Overview" name="overview"></a>
<h2 class="subtitle subtitle-overview">Overview</h2>
<p>Integrates SDWebImage async downloading and caching of remote images with UIImageView.</p>
<p>Usage with a UITableViewCell sub-class:</p>
<pre><code>#import &lt;SDWebImage/UIImageView+WebCache.h&gt;
...
- (UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *MyIdentifier = @"MyIdentifier";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier];
if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
reuseIdentifier:MyIdentifier] autorelease];
}
// Here we use the provided setImageWithURL: method to load the web image
// Ensure you use a placeholder image otherwise cells will be initialized with no image
[cell.imageView setImageWithURL:[NSURL URLWithString:@"http://example.com/image.jpg"]
placeholderImage:[UIImage imageNamed:@"placeholder"]];
cell.textLabel.text = @"My Text";
return cell;
}
</code></pre>
</div>
<div class="section section-tasks">
<a title="Tasks" name="tasks"></a>
<h2 class="subtitle subtitle-tasks">Tasks</h2>
<ul class="task-list">
<li>
<span class="tooltip">
<code><a href="#//api/name/setImageWithURL:">&ndash;&nbsp;setImageWithURL:</a></code>
<span class="tooltip"><p>Set the imageView <code>image</code> with an <code>url</code>.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/setImageWithURL:placeholderImage:">&ndash;&nbsp;setImageWithURL:placeholderImage:</a></code>
<span class="tooltip"><p>Set the imageView <code>image</code> with an <code>url</code> and a placeholder.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/setImageWithURL:placeholderImage:options:">&ndash;&nbsp;setImageWithURL:placeholderImage:options:</a></code>
<span class="tooltip"><p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/setImageWithURL:completed:">&ndash;&nbsp;setImageWithURL:completed:</a></code>
<span class="tooltip"><p>Set the imageView <code>image</code> with an <code>url</code>.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/setImageWithURL:placeholderImage:completed:">&ndash;&nbsp;setImageWithURL:placeholderImage:completed:</a></code>
<span class="tooltip"><p>Set the imageView <code>image</code> with an <code>url</code>, placeholder.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/setImageWithURL:placeholderImage:options:completed:">&ndash;&nbsp;setImageWithURL:placeholderImage:options:completed:</a></code>
<span class="tooltip"><p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/setImageWithURL:placeholderImage:options:progress:completed:">&ndash;&nbsp;setImageWithURL:placeholderImage:options:progress:completed:</a></code>
<span class="tooltip"><p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/cancelCurrentImageLoad">&ndash;&nbsp;cancelCurrentImageLoad</a></code>
<span class="tooltip"><p>Cancel the current download</p></span>
</span>
</li>
</ul>
</div>
<div class="section section-methods">
<a title="Instance Methods" name="instance_methods"></a>
<h2 class="subtitle subtitle-methods">Instance Methods</h2>
<div class="section-method">
<a name="//api/name/cancelCurrentImageLoad" title="cancelCurrentImageLoad"></a>
<h3 class="subsubtitle method-title">cancelCurrentImageLoad</h3>
<div class="method-subsection brief-description">
<p>Cancel the current download</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)cancelCurrentImageLoad</code></div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Cancel the current download</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">UIImageView+WebCache.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/setImageWithURL:" title="setImageWithURL:"></a>
<h3 class="subsubtitle method-title">setImageWithURL:</h3>
<div class="method-subsection brief-description">
<p>Set the imageView <code>image</code> with an <code>url</code>.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setImageWithURL:(NSURL *)<em>url</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The url for the image.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Set the imageView <code>image</code> with an <code>url</code>.</p>
<p>The downloand is asynchronous and cached.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">UIImageView+WebCache.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/setImageWithURL:completed:" title="setImageWithURL:completed:"></a>
<h3 class="subsubtitle method-title">setImageWithURL:completed:</h3>
<div class="method-subsection brief-description">
<p>Set the imageView <code>image</code> with an <code>url</code>.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setImageWithURL:(NSURL *)<em>url</em> completed:(SDWebImageCompletedBlock)<em>completedBlock</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The url for the image.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>completedBlock</em></dt>
<dd><p>A block called when operation has been completed. This block as no return value
and takes the requested UIImage as first parameter. In case of error the image parameter
is nil and the second parameter may contain an NSError. The third parameter is a Boolean
indicating if the image was retrived from the local cache of from the network.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Set the imageView <code>image</code> with an <code>url</code>.</p>
<p>The downloand is asynchronous and cached.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">UIImageView+WebCache.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/setImageWithURL:placeholderImage:" title="setImageWithURL:placeholderImage:"></a>
<h3 class="subsubtitle method-title">setImageWithURL:placeholderImage:</h3>
<div class="method-subsection brief-description">
<p>Set the imageView <code>image</code> with an <code>url</code> and a placeholder.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setImageWithURL:(NSURL *)<em>url</em> placeholderImage:(UIImage *)<em>placeholder</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The url for the image.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>placeholder</em></dt>
<dd><p>The image to be set initially, until the image request finishes.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Set the imageView <code>image</code> with an <code>url</code> and a placeholder.</p>
<p>The downloand is asynchronous and cached.</p>
</div>
<div class="method-subsection see-also-section">
<h4 class="method-subtitle">See Also</h4>
<ul>
<li><code><p><a href="#//api/name/setImageWithURL:placeholderImage:options:">&ndash; setImageWithURL:placeholderImage:options:</a></p></code></li>
</ul>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">UIImageView+WebCache.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/setImageWithURL:placeholderImage:completed:" title="setImageWithURL:placeholderImage:completed:"></a>
<h3 class="subsubtitle method-title">setImageWithURL:placeholderImage:completed:</h3>
<div class="method-subsection brief-description">
<p>Set the imageView <code>image</code> with an <code>url</code>, placeholder.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setImageWithURL:(NSURL *)<em>url</em> placeholderImage:(UIImage *)<em>placeholder</em> completed:(SDWebImageCompletedBlock)<em>completedBlock</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The url for the image.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>placeholder</em></dt>
<dd><p>The image to be set initially, until the image request finishes.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>completedBlock</em></dt>
<dd><p>A block called when operation has been completed. This block as no return value
and takes the requested UIImage as first parameter. In case of error the image parameter
is nil and the second parameter may contain an NSError. The third parameter is a Boolean
indicating if the image was retrived from the local cache of from the network.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Set the imageView <code>image</code> with an <code>url</code>, placeholder.</p>
<p>The downloand is asynchronous and cached.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">UIImageView+WebCache.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/setImageWithURL:placeholderImage:options:" title="setImageWithURL:placeholderImage:options:"></a>
<h3 class="subsubtitle method-title">setImageWithURL:placeholderImage:options:</h3>
<div class="method-subsection brief-description">
<p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setImageWithURL:(NSURL *)<em>url</em> placeholderImage:(UIImage *)<em>placeholder</em> options:(SDWebImageOptions)<em>options</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The url for the image.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>placeholder</em></dt>
<dd><p>The image to be set initially, until the image request finishes.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>options</em></dt>
<dd><p>The options to use when downloading the image. @see SDWebImageOptions for the possible values.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p>
<p>The downloand is asynchronous and cached.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">UIImageView+WebCache.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/setImageWithURL:placeholderImage:options:completed:" title="setImageWithURL:placeholderImage:options:completed:"></a>
<h3 class="subsubtitle method-title">setImageWithURL:placeholderImage:options:completed:</h3>
<div class="method-subsection brief-description">
<p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setImageWithURL:(NSURL *)<em>url</em> placeholderImage:(UIImage *)<em>placeholder</em> options:(SDWebImageOptions)<em>options</em> completed:(SDWebImageCompletedBlock)<em>completedBlock</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The url for the image.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>placeholder</em></dt>
<dd><p>The image to be set initially, until the image request finishes.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>options</em></dt>
<dd><p>The options to use when downloading the image. @see SDWebImageOptions for the possible values.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>completedBlock</em></dt>
<dd><p>A block called when operation has been completed. This block as no return value
and takes the requested UIImage as first parameter. In case of error the image parameter
is nil and the second parameter may contain an NSError. The third parameter is a Boolean
indicating if the image was retrived from the local cache of from the network.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p>
<p>The downloand is asynchronous and cached.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">UIImageView+WebCache.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/setImageWithURL:placeholderImage:options:progress:completed:" title="setImageWithURL:placeholderImage:options:progress:completed:"></a>
<h3 class="subsubtitle method-title">setImageWithURL:placeholderImage:options:progress:completed:</h3>
<div class="method-subsection brief-description">
<p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setImageWithURL:(NSURL *)<em>url</em> placeholderImage:(UIImage *)<em>placeholder</em> options:(SDWebImageOptions)<em>options</em> progress:(SDWebImageDownloaderProgressBlock)<em>progressBlock</em> completed:(SDWebImageCompletedBlock)<em>completedBlock</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The url for the image.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>placeholder</em></dt>
<dd><p>The image to be set initially, until the image request finishes.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>options</em></dt>
<dd><p>The options to use when downloading the image. @see SDWebImageOptions for the possible values.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>progressBlock</em></dt>
<dd><p>A block called while image is downloading</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>completedBlock</em></dt>
<dd><p>A block called when operation has been completed. This block as no return value
and takes the requested UIImage as first parameter. In case of error the image parameter
is nil and the second parameter may contain an NSError. The third parameter is a Boolean
indicating if the image was retrived from the local cache of from the network.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Set the imageView <code>image</code> with an <code>url</code>, placeholder and custom options.</p>
<p>The downloand is asynchronous and cached.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">UIImageView+WebCache.h</code><br />
</div>
</div>
</div>
</div>
<div class="main-navigation navigation-bottom">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2013 Olivier Poitrey. All rights reserved. (Last updated: 2013-04-02)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.1 (build 840)</a>.</span></p>
</div>
</div>
</div>
</article>
<script type="text/javascript">
function jumpToChange()
{
window.location.hash = this.options[this.selectedIndex].value;
}
function toggleTOC()
{
var contents = document.getElementById('contents');
var tocContainer = document.getElementById('tocContainer');
if (this.getAttribute('class') == 'open')
{
this.setAttribute('class', '');
contents.setAttribute('class', '');
tocContainer.setAttribute('class', '');
window.name = "hideTOC";
}
else
{
this.setAttribute('class', 'open');
contents.setAttribute('class', 'isShowingTOC');
tocContainer.setAttribute('class', 'isShowingTOC');
window.name = "";
}
return false;
}
function toggleTOCEntryChildren(e)
{
e.stopPropagation();
var currentClass = this.getAttribute('class');
if (currentClass == 'children') {
this.setAttribute('class', 'children open');
}
else if (currentClass == 'children open') {
this.setAttribute('class', 'children');
}
return false;
}
function tocEntryClick(e)
{
e.stopPropagation();
return true;
}
function init()
{
var selectElement = document.getElementById('jumpTo');
selectElement.addEventListener('change', jumpToChange, false);
var tocButton = document.getElementById('table_of_contents');
tocButton.addEventListener('click', toggleTOC, false);
var taskTreeItem = document.getElementById('task_treeitem');
if (taskTreeItem.getElementsByTagName('li').length > 0)
{
taskTreeItem.setAttribute('class', 'children');
taskTreeItem.firstChild.setAttribute('class', 'disclosure');
}
var tocList = document.getElementById('toc');
var tocEntries = tocList.getElementsByTagName('li');
for (var i = 0; i < tocEntries.length; i++) {
tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
}
var tocLinks = tocList.getElementsByTagName('a');
for (var i = 0; i < tocLinks.length; i++) {
tocLinks[i].addEventListener('click', tocEntryClick, false);
}
if (window.name == "hideTOC") {
toggleTOC.call(tocButton);
}
}
window.onload = init;
// If showing in Xcode, hide the TOC and Header
if (navigator.userAgent.match(/xcode/i)) {
document.getElementById("contents").className = "hideInXcode"
document.getElementById("tocContainer").className = "hideInXcode"
document.getElementById("top_header").className = "hideInXcode"
}
</script>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,595 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
<title>SDWebImageDownloader Class Reference</title>
<meta id="xcode-display" name="xcode-display" content="render"/>
<meta name="viewport" content="width=550" />
<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
<meta name="generator" content="appledoc 2.1 (build 840)" />
</head>
<body>
<header id="top_header">
<div id="library" class="hideInXcode">
<h1><a id="libraryTitle" href="../index.html">SDWebImage 3.2 </a></h1>
<a id="developerHome" href="../index.html">Olivier Poitrey</a>
</div>
<div id="title" role="banner">
<h1 class="hideInXcode">SDWebImageDownloader Class Reference</h1>
</div>
<ul id="headerButtons" role="toolbar">
<li id="toc_button">
<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
</li>
<li id="jumpto_button" role="navigation">
<select id="jumpTo">
<option value="top">Jump To&#133;</option>
<option value="overview">Overview</option>
<option value="tasks">Tasks</option>
<option value="properties">Properties</option>
<option value="//api/name/maxConcurrentDownloads">&nbsp;&nbsp;&nbsp;&nbsp;maxConcurrentDownloads</option>
<option value="//api/name/queueMode">&nbsp;&nbsp;&nbsp;&nbsp;queueMode</option>
<option value="class_methods">Class Methods</option>
<option value="//api/name/sharedDownloader">&nbsp;&nbsp;&nbsp;&nbsp;+ sharedDownloader</option>
<option value="instance_methods">Instance Methods</option>
<option value="//api/name/downloadImageWithURL:options:progress:completed:">&nbsp;&nbsp;&nbsp;&nbsp;- downloadImageWithURL:options:progress:completed:</option>
<option value="//api/name/setValue:forHTTPHeaderField:">&nbsp;&nbsp;&nbsp;&nbsp;- setValue:forHTTPHeaderField:</option>
<option value="//api/name/valueForHTTPHeaderField:">&nbsp;&nbsp;&nbsp;&nbsp;- valueForHTTPHeaderField:</option>
</select>
</li>
</ul>
</header>
<nav id="tocContainer" class="isShowingTOC">
<ul id="toc" role="tree">
<li role="treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#overview">Overview</a></span></li>
<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#properties">Properties</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/maxConcurrentDownloads">maxConcurrentDownloads</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/queueMode">queueMode</a></span></li>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#class_methods">Class Methods</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/sharedDownloader">sharedDownloader</a></span></li>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#instance_methods">Instance Methods</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/downloadImageWithURL:options:progress:completed:">downloadImageWithURL:options:progress:completed:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/setValue:forHTTPHeaderField:">setValue:forHTTPHeaderField:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/valueForHTTPHeaderField:">valueForHTTPHeaderField:</a></span></li>
</ul></li>
</ul>
</nav>
<article>
<div id="contents" class="isShowingTOC" role="main">
<a title="SDWebImageDownloader Class Reference" name="top"></a>
<div class="main-navigation navigation-top">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="header">
<div class="section-header">
<h1 class="title title-header">SDWebImageDownloader Class Reference</h1>
</div>
</div>
<div id="container">
<div class="section section-specification"><table cellspacing="0"><tbody>
<tr>
<td class="specification-title">Inherits from</td>
<td class="specification-value">NSObject</td>
</tr><tr>
<td class="specification-title">Declared in</td>
<td class="specification-value">SDWebImageDownloader.h</td>
</tr>
</tbody></table></div>
<div class="section section-overview">
<a title="Overview" name="overview"></a>
<h2 class="subtitle subtitle-overview">Overview</h2>
<p>Asynchronous downloader dedicated and optimized for image loading.</p>
</div>
<div class="section section-tasks">
<a title="Tasks" name="tasks"></a>
<h2 class="subtitle subtitle-tasks">Tasks</h2>
<ul class="task-list">
<li>
<span class="tooltip">
<code><a href="#//api/name/maxConcurrentDownloads">&nbsp;&nbsp;maxConcurrentDownloads</a></code>
</span>
<span class="task-item-suffix">property</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/queueMode">&nbsp;&nbsp;queueMode</a></code>
<span class="tooltip"><p>Changes download operations unqueue mode. Default value is <code>SDWebImageDownloaderFILOQueueMode</code>.</p></span>
</span>
<span class="task-item-suffix">property</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/sharedDownloader">+&nbsp;sharedDownloader</a></code>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/setValue:forHTTPHeaderField:">&ndash;&nbsp;setValue:forHTTPHeaderField:</a></code>
<span class="tooltip"><p>Set a value for a HTTP header to be appended to each download HTTP request.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/valueForHTTPHeaderField:">&ndash;&nbsp;valueForHTTPHeaderField:</a></code>
<span class="tooltip"><p>Returns the value of the specified HTTP header field.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/downloadImageWithURL:options:progress:completed:">&ndash;&nbsp;downloadImageWithURL:options:progress:completed:</a></code>
<span class="tooltip"><p>Creates a SDWebImageDownloader async downloader instance with a given URL</p></span>
</span>
</li>
</ul>
</div>
<div class="section section-methods">
<a title="Properties" name="properties"></a>
<h2 class="subtitle subtitle-methods">Properties</h2>
<div class="section-method">
<a name="//api/name/maxConcurrentDownloads" title="maxConcurrentDownloads"></a>
<h3 class="subsubtitle method-title">maxConcurrentDownloads</h3>
<div class="method-subsection method-declaration"><code>@property (assign, nonatomic) NSInteger maxConcurrentDownloads</code></div>
</div>
<div class="section-method">
<a name="//api/name/queueMode" title="queueMode"></a>
<h3 class="subsubtitle method-title">queueMode</h3>
<div class="method-subsection brief-description">
<p>Changes download operations unqueue mode. Default value is <code>SDWebImageDownloaderFILOQueueMode</code>.</p>
</div>
<div class="method-subsection method-declaration"><code>@property (assign, nonatomic) SDWebImageDownloaderQueueMode queueMode</code></div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Changes download operations unqueue mode. Default value is <code>SDWebImageDownloaderFILOQueueMode</code>.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImageDownloader.h</code><br />
</div>
</div>
</div>
<div class="section section-methods">
<a title="Class Methods" name="class_methods"></a>
<h2 class="subtitle subtitle-methods">Class Methods</h2>
<div class="section-method">
<a name="//api/name/sharedDownloader" title="sharedDownloader"></a>
<h3 class="subsubtitle method-title">sharedDownloader</h3>
<div class="method-subsection method-declaration"><code>+ (SDWebImageDownloader *)sharedDownloader</code></div>
</div>
</div>
<div class="section section-methods">
<a title="Instance Methods" name="instance_methods"></a>
<h2 class="subtitle subtitle-methods">Instance Methods</h2>
<div class="section-method">
<a name="//api/name/downloadImageWithURL:options:progress:completed:" title="downloadImageWithURL:options:progress:completed:"></a>
<h3 class="subsubtitle method-title">downloadImageWithURL:options:progress:completed:</h3>
<div class="method-subsection brief-description">
<p>Creates a SDWebImageDownloader async downloader instance with a given URL</p>
</div>
<div class="method-subsection method-declaration"><code>- (id&lt;SDWebImageOperation&gt;)downloadImageWithURL:(NSURL *)<em>url</em> options:(SDWebImageDownloaderOptions)<em>options</em> progress:(SDWebImageDownloaderProgressBlock)<em>progressBlock</em> completed:(SDWebImageDownloaderCompletedBlock)<em>completedBlock</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The URL to the image to download</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>options</em></dt>
<dd><p>The options to be used for this download</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>completed</em></dt>
<dd><p>A block called once the download is completed.
If the download succeeded, the image parameter is set, in case of error,
error parameter is set with the error. The last parameter is always YES
if SDWebImageDownloaderProgressiveDownload isn&rsquo;t use. With the
SDWebImageDownloaderProgressiveDownload option, this block is called
repeatedly with the partial image object and the finished argument set to NO
before to be called a last time with the full image and finished argument
set to YES. In case of error, the finished argument is always YES.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>progress</em></dt>
<dd><p>A block called repeatedly while the image is downloading</p></dd>
</dl>
</div>
<div class="method-subsection return">
<h4 class="method-subtitle parameter-title">Return Value</h4>
<p>A cancellable <a href="../Protocols/SDWebImageOperation.html">SDWebImageOperation</a></p>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Creates a SDWebImageDownloader async downloader instance with a given URL</p>
<p>The delegate will be informed when the image is finish downloaded or an error has happen.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImageDownloader.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/setValue:forHTTPHeaderField:" title="setValue:forHTTPHeaderField:"></a>
<h3 class="subsubtitle method-title">setValue:forHTTPHeaderField:</h3>
<div class="method-subsection brief-description">
<p>Set a value for a HTTP header to be appended to each download HTTP request.</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)setValue:(NSString *)<em>value</em> forHTTPHeaderField:(NSString *)<em>field</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>value</em></dt>
<dd><p>The value for the header field. Use <code>nil</code> value to remove the header.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>field</em></dt>
<dd><p>The name of the header field to set.</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Set a value for a HTTP header to be appended to each download HTTP request.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImageDownloader.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/valueForHTTPHeaderField:" title="valueForHTTPHeaderField:"></a>
<h3 class="subsubtitle method-title">valueForHTTPHeaderField:</h3>
<div class="method-subsection brief-description">
<p>Returns the value of the specified HTTP header field.</p>
</div>
<div class="method-subsection method-declaration"><code>- (NSString *)valueForHTTPHeaderField:(NSString *)<em>field</em></code></div>
<div class="method-subsection return">
<h4 class="method-subtitle parameter-title">Return Value</h4>
<p>The value associated with the header field field, or <code>nil</code> if there is no corresponding header field.</p>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Returns the value of the specified HTTP header field.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImageDownloader.h</code><br />
</div>
</div>
</div>
</div>
<div class="main-navigation navigation-bottom">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2013 Olivier Poitrey. All rights reserved. (Last updated: 2013-04-02)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.1 (build 840)</a>.</span></p>
</div>
</div>
</div>
</article>
<script type="text/javascript">
function jumpToChange()
{
window.location.hash = this.options[this.selectedIndex].value;
}
function toggleTOC()
{
var contents = document.getElementById('contents');
var tocContainer = document.getElementById('tocContainer');
if (this.getAttribute('class') == 'open')
{
this.setAttribute('class', '');
contents.setAttribute('class', '');
tocContainer.setAttribute('class', '');
window.name = "hideTOC";
}
else
{
this.setAttribute('class', 'open');
contents.setAttribute('class', 'isShowingTOC');
tocContainer.setAttribute('class', 'isShowingTOC');
window.name = "";
}
return false;
}
function toggleTOCEntryChildren(e)
{
e.stopPropagation();
var currentClass = this.getAttribute('class');
if (currentClass == 'children') {
this.setAttribute('class', 'children open');
}
else if (currentClass == 'children open') {
this.setAttribute('class', 'children');
}
return false;
}
function tocEntryClick(e)
{
e.stopPropagation();
return true;
}
function init()
{
var selectElement = document.getElementById('jumpTo');
selectElement.addEventListener('change', jumpToChange, false);
var tocButton = document.getElementById('table_of_contents');
tocButton.addEventListener('click', toggleTOC, false);
var taskTreeItem = document.getElementById('task_treeitem');
if (taskTreeItem.getElementsByTagName('li').length > 0)
{
taskTreeItem.setAttribute('class', 'children');
taskTreeItem.firstChild.setAttribute('class', 'disclosure');
}
var tocList = document.getElementById('toc');
var tocEntries = tocList.getElementsByTagName('li');
for (var i = 0; i < tocEntries.length; i++) {
tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
}
var tocLinks = tocList.getElementsByTagName('a');
for (var i = 0; i < tocLinks.length; i++) {
tocLinks[i].addEventListener('click', tocEntryClick, false);
}
if (window.name == "hideTOC") {
toggleTOC.call(tocButton);
}
}
window.onload = init;
// If showing in Xcode, hide the TOC and Header
if (navigator.userAgent.match(/xcode/i)) {
document.getElementById("contents").className = "hideInXcode"
document.getElementById("tocContainer").className = "hideInXcode"
document.getElementById("top_header").className = "hideInXcode"
}
</script>
</body>
</html>

View File

@@ -0,0 +1,328 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
<title>SDWebImageDownloaderOperation Class Reference</title>
<meta id="xcode-display" name="xcode-display" content="render"/>
<meta name="viewport" content="width=550" />
<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
<meta name="generator" content="appledoc 2.1 (build 840)" />
</head>
<body>
<header id="top_header">
<div id="library" class="hideInXcode">
<h1><a id="libraryTitle" href="../index.html">SDWebImage 3.2 </a></h1>
<a id="developerHome" href="../index.html">Olivier Poitrey</a>
</div>
<div id="title" role="banner">
<h1 class="hideInXcode">SDWebImageDownloaderOperation Class Reference</h1>
</div>
<ul id="headerButtons" role="toolbar">
<li id="toc_button">
<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
</li>
<li id="jumpto_button" role="navigation">
<select id="jumpTo">
<option value="top">Jump To&#133;</option>
<option value="tasks">Tasks</option>
<option value="properties">Properties</option>
<option value="//api/name/options">&nbsp;&nbsp;&nbsp;&nbsp;options</option>
<option value="//api/name/request">&nbsp;&nbsp;&nbsp;&nbsp;request</option>
<option value="instance_methods">Instance Methods</option>
<option value="//api/name/initWithRequest:queue:options:progress:completed:cancelled:">&nbsp;&nbsp;&nbsp;&nbsp;- initWithRequest:queue:options:progress:completed:cancelled:</option>
</select>
</li>
</ul>
</header>
<nav id="tocContainer" class="isShowingTOC">
<ul id="toc" role="tree">
<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#properties">Properties</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/options">options</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/request">request</a></span></li>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#instance_methods">Instance Methods</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/initWithRequest:queue:options:progress:completed:cancelled:">initWithRequest:queue:options:progress:completed:cancelled:</a></span></li>
</ul></li>
</ul>
</nav>
<article>
<div id="contents" class="isShowingTOC" role="main">
<a title="SDWebImageDownloaderOperation Class Reference" name="top"></a>
<div class="main-navigation navigation-top">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="header">
<div class="section-header">
<h1 class="title title-header">SDWebImageDownloaderOperation Class Reference</h1>
</div>
</div>
<div id="container">
<div class="section section-specification"><table cellspacing="0"><tbody>
<tr>
<td class="specification-title">Inherits from</td>
<td class="specification-value">NSOperation</td>
</tr><tr>
<td class="specification-title">Conforms to</td>
<td class="specification-value"><a href="../Protocols/SDWebImageOperation.html">SDWebImageOperation</a></td>
</tr><tr>
<td class="specification-title">Declared in</td>
<td class="specification-value">SDWebImageDownloaderOperation.h</td>
</tr>
</tbody></table></div>
<div class="section section-tasks">
<a title="Tasks" name="tasks"></a>
<h2 class="subtitle subtitle-tasks">Tasks</h2>
<ul class="task-list">
<li>
<span class="tooltip">
<code><a href="#//api/name/request">&nbsp;&nbsp;request</a></code>
</span>
<span class="task-item-suffix">property</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/options">&nbsp;&nbsp;options</a></code>
</span>
<span class="task-item-suffix">property</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/initWithRequest:queue:options:progress:completed:cancelled:">&ndash;&nbsp;initWithRequest:queue:options:progress:completed:cancelled:</a></code>
</span>
</li>
</ul>
</div>
<div class="section section-methods">
<a title="Properties" name="properties"></a>
<h2 class="subtitle subtitle-methods">Properties</h2>
<div class="section-method">
<a name="//api/name/options" title="options"></a>
<h3 class="subsubtitle method-title">options</h3>
<div class="method-subsection method-declaration"><code>@property (assign, nonatomic, readonly) SDWebImageDownloaderOptions options</code></div>
</div>
<div class="section-method">
<a name="//api/name/request" title="request"></a>
<h3 class="subsubtitle method-title">request</h3>
<div class="method-subsection method-declaration"><code>@property (strong, nonatomic, readonly) NSURLRequest *request</code></div>
</div>
</div>
<div class="section section-methods">
<a title="Instance Methods" name="instance_methods"></a>
<h2 class="subtitle subtitle-methods">Instance Methods</h2>
<div class="section-method">
<a name="//api/name/initWithRequest:queue:options:progress:completed:cancelled:" title="initWithRequest:queue:options:progress:completed:cancelled:"></a>
<h3 class="subsubtitle method-title">initWithRequest:queue:options:progress:completed:cancelled:</h3>
<div class="method-subsection method-declaration"><code>- (id)initWithRequest:(NSURLRequest *)<em>request</em> queue:(dispatch_queue_t)<em>queue</em> options:(SDWebImageDownloaderOptions)<em>options</em> progress:(SDWebImageDownloaderProgressBlock)<em>progressBlock</em> completed:(SDWebImageDownloaderCompletedBlock)<em>completedBlock</em> cancelled:(void ( ^ ) ( ))<em>cancelBlock</em></code></div>
</div>
</div>
</div>
<div class="main-navigation navigation-bottom">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2013 Olivier Poitrey. All rights reserved. (Last updated: 2013-04-02)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.1 (build 840)</a>.</span></p>
</div>
</div>
</div>
</article>
<script type="text/javascript">
function jumpToChange()
{
window.location.hash = this.options[this.selectedIndex].value;
}
function toggleTOC()
{
var contents = document.getElementById('contents');
var tocContainer = document.getElementById('tocContainer');
if (this.getAttribute('class') == 'open')
{
this.setAttribute('class', '');
contents.setAttribute('class', '');
tocContainer.setAttribute('class', '');
window.name = "hideTOC";
}
else
{
this.setAttribute('class', 'open');
contents.setAttribute('class', 'isShowingTOC');
tocContainer.setAttribute('class', 'isShowingTOC');
window.name = "";
}
return false;
}
function toggleTOCEntryChildren(e)
{
e.stopPropagation();
var currentClass = this.getAttribute('class');
if (currentClass == 'children') {
this.setAttribute('class', 'children open');
}
else if (currentClass == 'children open') {
this.setAttribute('class', 'children');
}
return false;
}
function tocEntryClick(e)
{
e.stopPropagation();
return true;
}
function init()
{
var selectElement = document.getElementById('jumpTo');
selectElement.addEventListener('change', jumpToChange, false);
var tocButton = document.getElementById('table_of_contents');
tocButton.addEventListener('click', toggleTOC, false);
var taskTreeItem = document.getElementById('task_treeitem');
if (taskTreeItem.getElementsByTagName('li').length > 0)
{
taskTreeItem.setAttribute('class', 'children');
taskTreeItem.firstChild.setAttribute('class', 'disclosure');
}
var tocList = document.getElementById('toc');
var tocEntries = tocList.getElementsByTagName('li');
for (var i = 0; i < tocEntries.length; i++) {
tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
}
var tocLinks = tocList.getElementsByTagName('a');
for (var i = 0; i < tocLinks.length; i++) {
tocLinks[i].addEventListener('click', tocEntryClick, false);
}
if (window.name == "hideTOC") {
toggleTOC.call(tocButton);
}
}
window.onload = init;
// If showing in Xcode, hide the TOC and Header
if (navigator.userAgent.match(/xcode/i)) {
document.getElementById("contents").className = "hideInXcode"
document.getElementById("tocContainer").className = "hideInXcode"
document.getElementById("top_header").className = "hideInXcode"
}
</script>
</body>
</html>

View File

@@ -0,0 +1,692 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
<title>SDWebImageManager Class Reference</title>
<meta id="xcode-display" name="xcode-display" content="render"/>
<meta name="viewport" content="width=550" />
<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
<meta name="generator" content="appledoc 2.1 (build 840)" />
</head>
<body>
<header id="top_header">
<div id="library" class="hideInXcode">
<h1><a id="libraryTitle" href="../index.html">SDWebImage 3.2 </a></h1>
<a id="developerHome" href="../index.html">Olivier Poitrey</a>
</div>
<div id="title" role="banner">
<h1 class="hideInXcode">SDWebImageManager Class Reference</h1>
</div>
<ul id="headerButtons" role="toolbar">
<li id="toc_button">
<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
</li>
<li id="jumpto_button" role="navigation">
<select id="jumpTo">
<option value="top">Jump To&#133;</option>
<option value="overview">Overview</option>
<option value="tasks">Tasks</option>
<option value="properties">Properties</option>
<option value="//api/name/cacheKeyFilter">&nbsp;&nbsp;&nbsp;&nbsp;cacheKeyFilter</option>
<option value="//api/name/delegate">&nbsp;&nbsp;&nbsp;&nbsp;delegate</option>
<option value="//api/name/imageCache">&nbsp;&nbsp;&nbsp;&nbsp;imageCache</option>
<option value="//api/name/imageDownloader">&nbsp;&nbsp;&nbsp;&nbsp;imageDownloader</option>
<option value="class_methods">Class Methods</option>
<option value="//api/name/sharedManager">&nbsp;&nbsp;&nbsp;&nbsp;+ sharedManager</option>
<option value="instance_methods">Instance Methods</option>
<option value="//api/name/cancelAll">&nbsp;&nbsp;&nbsp;&nbsp;- cancelAll</option>
<option value="//api/name/downloadWithURL:options:progress:completed:">&nbsp;&nbsp;&nbsp;&nbsp;- downloadWithURL:options:progress:completed:</option>
<option value="//api/name/isRunning">&nbsp;&nbsp;&nbsp;&nbsp;- isRunning</option>
</select>
</li>
</ul>
</header>
<nav id="tocContainer" class="isShowingTOC">
<ul id="toc" role="tree">
<li role="treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#overview">Overview</a></span></li>
<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#properties">Properties</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/cacheKeyFilter">cacheKeyFilter</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/delegate">delegate</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/imageCache">imageCache</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/imageDownloader">imageDownloader</a></span></li>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#class_methods">Class Methods</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/sharedManager">sharedManager</a></span></li>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#instance_methods">Instance Methods</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/cancelAll">cancelAll</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/downloadWithURL:options:progress:completed:">downloadWithURL:options:progress:completed:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/isRunning">isRunning</a></span></li>
</ul></li>
</ul>
</nav>
<article>
<div id="contents" class="isShowingTOC" role="main">
<a title="SDWebImageManager Class Reference" name="top"></a>
<div class="main-navigation navigation-top">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="header">
<div class="section-header">
<h1 class="title title-header">SDWebImageManager Class Reference</h1>
</div>
</div>
<div id="container">
<div class="section section-specification"><table cellspacing="0"><tbody>
<tr>
<td class="specification-title">Inherits from</td>
<td class="specification-value">NSObject</td>
</tr><tr>
<td class="specification-title">Declared in</td>
<td class="specification-value">SDWebImageManager.h</td>
</tr>
</tbody></table></div>
<div class="section section-overview">
<a title="Overview" name="overview"></a>
<h2 class="subtitle subtitle-overview">Overview</h2>
<p>The SDWebImageManager is the class behind the UIImageView+WebCache category and likes.
It ties the asynchronous downloader (<a href="../Classes/SDWebImageDownloader.html">SDWebImageDownloader</a>) with the image cache store (<a href="../Classes/SDImageCache.html">SDImageCache</a>).
You can use this class directly to benefit from web image downloading with caching in another context than
a UIView.</p>
<p>Here is a simple example of how to use SDWebImageManager:</p>
<p>SDWebImageManager <em>manager = <a href="#//api/name/sharedManager">[SDWebImageManager sharedManager]</a>;
[manager downloadWithURL:imageURL
delegate:self
options:0
progress:nil
completed:^(UIImage </em>image, NSError *error, BOOL fromCache)
{
if (image)
{
// do something with image
}
}];</p>
</div>
<div class="section section-tasks">
<a title="Tasks" name="tasks"></a>
<h2 class="subtitle subtitle-tasks">Tasks</h2>
<ul class="task-list">
<li>
<span class="tooltip">
<code><a href="#//api/name/delegate">&nbsp;&nbsp;delegate</a></code>
</span>
<span class="task-item-suffix">property</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/imageCache">&nbsp;&nbsp;imageCache</a></code>
</span>
<span class="task-item-suffix">property</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/imageDownloader">&nbsp;&nbsp;imageDownloader</a></code>
</span>
<span class="task-item-suffix">property</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/cacheKeyFilter">&nbsp;&nbsp;cacheKeyFilter</a></code>
<span class="tooltip"><p>The cache filter is a block used each time SDWebImageManager need to convert an URL into a cache key. This can
be used to remove dynamic part of an image URL.</p></span>
</span>
<span class="task-item-suffix">property</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/sharedManager">+&nbsp;sharedManager</a></code>
<span class="tooltip"><p>Returns global SDWebImageManager instance.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/downloadWithURL:options:progress:completed:">&ndash;&nbsp;downloadWithURL:options:progress:completed:</a></code>
<span class="tooltip"><p>Downloads the image at the given URL if not present in cache or return the cached version otherwise.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/cancelAll">&ndash;&nbsp;cancelAll</a></code>
<span class="tooltip"><p>Cancel all current opreations</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/isRunning">&ndash;&nbsp;isRunning</a></code>
<span class="tooltip"><p>Check one or more operations running</p></span>
</span>
</li>
</ul>
</div>
<div class="section section-methods">
<a title="Properties" name="properties"></a>
<h2 class="subtitle subtitle-methods">Properties</h2>
<div class="section-method">
<a name="//api/name/cacheKeyFilter" title="cacheKeyFilter"></a>
<h3 class="subsubtitle method-title">cacheKeyFilter</h3>
<div class="method-subsection brief-description">
<p>The cache filter is a block used each time SDWebImageManager need to convert an URL into a cache key. This can
be used to remove dynamic part of an image URL.</p>
</div>
<div class="method-subsection method-declaration"><code>@property (strong) NSString *^ ) ( NSURL *url ) cacheKeyFilter</code></div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>The cache filter is a block used each time SDWebImageManager need to convert an URL into a cache key. This can
be used to remove dynamic part of an image URL.</p>
<p>The following example sets a filter in the application delegate that will remove any query-string from the
URL before to use it as a cache key:</p>
<pre><code>[[SDWebImageManager sharedManager] setCacheKeyFilter:^(NSURL *url)
{
url = [[NSURL alloc] initWithScheme:url.scheme host:url.host path:url.path];
return [url absoluteString];
}];
</code></pre>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImageManager.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/delegate" title="delegate"></a>
<h3 class="subsubtitle method-title">delegate</h3>
<div class="method-subsection method-declaration"><code>@property (weak, nonatomic) id&lt;SDWebImageManagerDelegate&gt; delegate</code></div>
</div>
<div class="section-method">
<a name="//api/name/imageCache" title="imageCache"></a>
<h3 class="subsubtitle method-title">imageCache</h3>
<div class="method-subsection method-declaration"><code>@property (strong, nonatomic, readonly) SDImageCache *imageCache</code></div>
</div>
<div class="section-method">
<a name="//api/name/imageDownloader" title="imageDownloader"></a>
<h3 class="subsubtitle method-title">imageDownloader</h3>
<div class="method-subsection method-declaration"><code>@property (strong, nonatomic, readonly) SDWebImageDownloader *imageDownloader</code></div>
</div>
</div>
<div class="section section-methods">
<a title="Class Methods" name="class_methods"></a>
<h2 class="subtitle subtitle-methods">Class Methods</h2>
<div class="section-method">
<a name="//api/name/sharedManager" title="sharedManager"></a>
<h3 class="subsubtitle method-title">sharedManager</h3>
<div class="method-subsection brief-description">
<p>Returns global SDWebImageManager instance.</p>
</div>
<div class="method-subsection method-declaration"><code>+ (SDWebImageManager *)sharedManager</code></div>
<div class="method-subsection return">
<h4 class="method-subtitle parameter-title">Return Value</h4>
<p>SDWebImageManager shared instance</p>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Returns global SDWebImageManager instance.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImageManager.h</code><br />
</div>
</div>
</div>
<div class="section section-methods">
<a title="Instance Methods" name="instance_methods"></a>
<h2 class="subtitle subtitle-methods">Instance Methods</h2>
<div class="section-method">
<a name="//api/name/cancelAll" title="cancelAll"></a>
<h3 class="subsubtitle method-title">cancelAll</h3>
<div class="method-subsection brief-description">
<p>Cancel all current opreations</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)cancelAll</code></div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Cancel all current opreations</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImageManager.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/downloadWithURL:options:progress:completed:" title="downloadWithURL:options:progress:completed:"></a>
<h3 class="subsubtitle method-title">downloadWithURL:options:progress:completed:</h3>
<div class="method-subsection brief-description">
<p>Downloads the image at the given URL if not present in cache or return the cached version otherwise.</p>
</div>
<div class="method-subsection method-declaration"><code>- (id&lt;SDWebImageOperation&gt;)downloadWithURL:(NSURL *)<em>url</em> options:(SDWebImageOptions)<em>options</em> progress:(SDWebImageDownloaderProgressBlock)<em>progressBlock</em> completed:(SDWebImageCompletedWithFinishedBlock)<em>completedBlock</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>url</em></dt>
<dd><p>The URL to the image</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>options</em></dt>
<dd><p>A mask to specify options to use for this request</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>progressBlock</em></dt>
<dd><p>A block called while image is downloading</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>completedBlock</em></dt>
<dd><p>A block called when operation has been completed.</p>
<p>This block as no return value and takes the requested UIImage as first parameter.
In case of error the image parameter is nil and the second parameter may contain an NSError.</p>
<p>The third parameter is a Boolean indicating if the image was retrived from the local cache
of from the network.</p>
<p>The last parameter is set to NO when the SDWebImageProgressiveDownload option is used and
the image is downloading. This block is thus called repetidly with a partial image. When
image is fully downloaded, the block is called a last time with the full image and the last
parameter set to YES.</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>delegate</em></dt>
<dd><p>The <a href="#//api/name/delegate">delegate</a> object used to send result back</p></dd>
</dl>
</div>
<div class="method-subsection return">
<h4 class="method-subtitle parameter-title">Return Value</h4>
<p>Returns a cancellable NSOperation</p>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Downloads the image at the given URL if not present in cache or return the cached version otherwise.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImageManager.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/isRunning" title="isRunning"></a>
<h3 class="subsubtitle method-title">isRunning</h3>
<div class="method-subsection brief-description">
<p>Check one or more operations running</p>
</div>
<div class="method-subsection method-declaration"><code>- (BOOL)isRunning</code></div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Check one or more operations running</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImageManager.h</code><br />
</div>
</div>
</div>
</div>
<div class="main-navigation navigation-bottom">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2013 Olivier Poitrey. All rights reserved. (Last updated: 2013-04-02)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.1 (build 840)</a>.</span></p>
</div>
</div>
</div>
</article>
<script type="text/javascript">
function jumpToChange()
{
window.location.hash = this.options[this.selectedIndex].value;
}
function toggleTOC()
{
var contents = document.getElementById('contents');
var tocContainer = document.getElementById('tocContainer');
if (this.getAttribute('class') == 'open')
{
this.setAttribute('class', '');
contents.setAttribute('class', '');
tocContainer.setAttribute('class', '');
window.name = "hideTOC";
}
else
{
this.setAttribute('class', 'open');
contents.setAttribute('class', 'isShowingTOC');
tocContainer.setAttribute('class', 'isShowingTOC');
window.name = "";
}
return false;
}
function toggleTOCEntryChildren(e)
{
e.stopPropagation();
var currentClass = this.getAttribute('class');
if (currentClass == 'children') {
this.setAttribute('class', 'children open');
}
else if (currentClass == 'children open') {
this.setAttribute('class', 'children');
}
return false;
}
function tocEntryClick(e)
{
e.stopPropagation();
return true;
}
function init()
{
var selectElement = document.getElementById('jumpTo');
selectElement.addEventListener('change', jumpToChange, false);
var tocButton = document.getElementById('table_of_contents');
tocButton.addEventListener('click', toggleTOC, false);
var taskTreeItem = document.getElementById('task_treeitem');
if (taskTreeItem.getElementsByTagName('li').length > 0)
{
taskTreeItem.setAttribute('class', 'children');
taskTreeItem.firstChild.setAttribute('class', 'disclosure');
}
var tocList = document.getElementById('toc');
var tocEntries = tocList.getElementsByTagName('li');
for (var i = 0; i < tocEntries.length; i++) {
tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
}
var tocLinks = tocList.getElementsByTagName('a');
for (var i = 0; i < tocLinks.length; i++) {
tocLinks[i].addEventListener('click', tocEntryClick, false);
}
if (window.name == "hideTOC") {
toggleTOC.call(tocButton);
}
}
window.onload = init;
// If showing in Xcode, hide the TOC and Header
if (navigator.userAgent.match(/xcode/i)) {
document.getElementById("contents").className = "hideInXcode"
document.getElementById("tocContainer").className = "hideInXcode"
document.getElementById("top_header").className = "hideInXcode"
}
</script>
</body>
</html>

View File

@@ -0,0 +1,633 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
<title>SDWebImagePrefetcher Class Reference</title>
<meta id="xcode-display" name="xcode-display" content="render"/>
<meta name="viewport" content="width=550" />
<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
<meta name="generator" content="appledoc 2.1 (build 840)" />
</head>
<body>
<header id="top_header">
<div id="library" class="hideInXcode">
<h1><a id="libraryTitle" href="../index.html">SDWebImage 3.2 </a></h1>
<a id="developerHome" href="../index.html">Olivier Poitrey</a>
</div>
<div id="title" role="banner">
<h1 class="hideInXcode">SDWebImagePrefetcher Class Reference</h1>
</div>
<ul id="headerButtons" role="toolbar">
<li id="toc_button">
<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
</li>
<li id="jumpto_button" role="navigation">
<select id="jumpTo">
<option value="top">Jump To&#133;</option>
<option value="overview">Overview</option>
<option value="tasks">Tasks</option>
<option value="properties">Properties</option>
<option value="//api/name/maxConcurrentDownloads">&nbsp;&nbsp;&nbsp;&nbsp;maxConcurrentDownloads</option>
<option value="//api/name/options">&nbsp;&nbsp;&nbsp;&nbsp;options</option>
<option value="class_methods">Class Methods</option>
<option value="//api/name/sharedImagePrefetcher">&nbsp;&nbsp;&nbsp;&nbsp;+ sharedImagePrefetcher</option>
<option value="instance_methods">Instance Methods</option>
<option value="//api/name/cancelPrefetching">&nbsp;&nbsp;&nbsp;&nbsp;- cancelPrefetching</option>
<option value="//api/name/prefetchURLs:">&nbsp;&nbsp;&nbsp;&nbsp;- prefetchURLs:</option>
<option value="//api/name/prefetchURLs:completed:">&nbsp;&nbsp;&nbsp;&nbsp;- prefetchURLs:completed:</option>
</select>
</li>
</ul>
</header>
<nav id="tocContainer" class="isShowingTOC">
<ul id="toc" role="tree">
<li role="treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#overview">Overview</a></span></li>
<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#properties">Properties</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/maxConcurrentDownloads">maxConcurrentDownloads</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/options">options</a></span></li>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#class_methods">Class Methods</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/sharedImagePrefetcher">sharedImagePrefetcher</a></span></li>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#instance_methods">Instance Methods</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/cancelPrefetching">cancelPrefetching</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/prefetchURLs:">prefetchURLs:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/prefetchURLs:completed:">prefetchURLs:completed:</a></span></li>
</ul></li>
</ul>
</nav>
<article>
<div id="contents" class="isShowingTOC" role="main">
<a title="SDWebImagePrefetcher Class Reference" name="top"></a>
<div class="main-navigation navigation-top">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="header">
<div class="section-header">
<h1 class="title title-header">SDWebImagePrefetcher Class Reference</h1>
</div>
</div>
<div id="container">
<div class="section section-specification"><table cellspacing="0"><tbody>
<tr>
<td class="specification-title">Inherits from</td>
<td class="specification-value">NSObject</td>
</tr><tr>
<td class="specification-title">Declared in</td>
<td class="specification-value">SDWebImagePrefetcher.h</td>
</tr>
</tbody></table></div>
<div class="section section-overview">
<a title="Overview" name="overview"></a>
<h2 class="subtitle subtitle-overview">Overview</h2>
<p>Prefetch some URLs in the cache for future use. Images are downloaded in low priority.</p>
</div>
<div class="section section-tasks">
<a title="Tasks" name="tasks"></a>
<h2 class="subtitle subtitle-tasks">Tasks</h2>
<ul class="task-list">
<li>
<span class="tooltip">
<code><a href="#//api/name/maxConcurrentDownloads">&nbsp;&nbsp;maxConcurrentDownloads</a></code>
<span class="tooltip"><p>Maximum number of URLs to prefetch at the same time. Defaults to 3.</p></span>
</span>
<span class="task-item-suffix">property</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/options">&nbsp;&nbsp;options</a></code>
<span class="tooltip"><p>SDWebImageOptions for prefetcher. Defaults to SDWebImageLowPriority.</p></span>
</span>
<span class="task-item-suffix">property</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/sharedImagePrefetcher">+&nbsp;sharedImagePrefetcher</a></code>
<span class="tooltip"><p>Return the global image prefetcher instance.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/prefetchURLs:">&ndash;&nbsp;prefetchURLs:</a></code>
<span class="tooltip"><p>Assign list of URLs to let SDWebImagePrefetcher to queue the prefetching,
currently one image is downloaded at a time,
and skips images for failed downloads and proceed to the next image in the list</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/prefetchURLs:completed:">&ndash;&nbsp;prefetchURLs:completed:</a></code>
<span class="tooltip"><p>Assign list of URLs to let SDWebImagePrefetcher to queue the prefetching,
currently one image is downloaded at a time,
and skips images for failed downloads and proceed to the next image in the list</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/cancelPrefetching">&ndash;&nbsp;cancelPrefetching</a></code>
<span class="tooltip"><p>Remove and cancel queued list</p></span>
</span>
</li>
</ul>
</div>
<div class="section section-methods">
<a title="Properties" name="properties"></a>
<h2 class="subtitle subtitle-methods">Properties</h2>
<div class="section-method">
<a name="//api/name/maxConcurrentDownloads" title="maxConcurrentDownloads"></a>
<h3 class="subsubtitle method-title">maxConcurrentDownloads</h3>
<div class="method-subsection brief-description">
<p>Maximum number of URLs to prefetch at the same time. Defaults to 3.</p>
</div>
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) NSUInteger maxConcurrentDownloads</code></div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Maximum number of URLs to prefetch at the same time. Defaults to 3.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImagePrefetcher.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/options" title="options"></a>
<h3 class="subsubtitle method-title">options</h3>
<div class="method-subsection brief-description">
<p>SDWebImageOptions for prefetcher. Defaults to SDWebImageLowPriority.</p>
</div>
<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) SDWebImageOptions options</code></div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>SDWebImageOptions for prefetcher. Defaults to SDWebImageLowPriority.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImagePrefetcher.h</code><br />
</div>
</div>
</div>
<div class="section section-methods">
<a title="Class Methods" name="class_methods"></a>
<h2 class="subtitle subtitle-methods">Class Methods</h2>
<div class="section-method">
<a name="//api/name/sharedImagePrefetcher" title="sharedImagePrefetcher"></a>
<h3 class="subsubtitle method-title">sharedImagePrefetcher</h3>
<div class="method-subsection brief-description">
<p>Return the global image prefetcher instance.</p>
</div>
<div class="method-subsection method-declaration"><code>+ (SDWebImagePrefetcher *)sharedImagePrefetcher</code></div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Return the global image prefetcher instance.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImagePrefetcher.h</code><br />
</div>
</div>
</div>
<div class="section section-methods">
<a title="Instance Methods" name="instance_methods"></a>
<h2 class="subtitle subtitle-methods">Instance Methods</h2>
<div class="section-method">
<a name="//api/name/cancelPrefetching" title="cancelPrefetching"></a>
<h3 class="subsubtitle method-title">cancelPrefetching</h3>
<div class="method-subsection brief-description">
<p>Remove and cancel queued list</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)cancelPrefetching</code></div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Remove and cancel queued list</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImagePrefetcher.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/prefetchURLs:" title="prefetchURLs:"></a>
<h3 class="subsubtitle method-title">prefetchURLs:</h3>
<div class="method-subsection brief-description">
<p>Assign list of URLs to let SDWebImagePrefetcher to queue the prefetching,
currently one image is downloaded at a time,
and skips images for failed downloads and proceed to the next image in the list</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)prefetchURLs:(NSArray *)<em>urls</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>urls</em></dt>
<dd><p>list of URLs to prefetch</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Assign list of URLs to let SDWebImagePrefetcher to queue the prefetching,
currently one image is downloaded at a time,
and skips images for failed downloads and proceed to the next image in the list</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImagePrefetcher.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/prefetchURLs:completed:" title="prefetchURLs:completed:"></a>
<h3 class="subsubtitle method-title">prefetchURLs:completed:</h3>
<div class="method-subsection brief-description">
<p>Assign list of URLs to let SDWebImagePrefetcher to queue the prefetching,
currently one image is downloaded at a time,
and skips images for failed downloads and proceed to the next image in the list</p>
</div>
<div class="method-subsection method-declaration"><code>- (void)prefetchURLs:(NSArray *)<em>urls</em> completed:(void ( ^ ) ( NSUInteger finishedCount , NSUInteger skippedCount ))<em>completionBlock</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>urls</em></dt>
<dd><p>list of URLs to prefetch</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>completionBlock</em></dt>
<dd><p>block to be called when prefetching is completed</p></dd>
</dl>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Assign list of URLs to let SDWebImagePrefetcher to queue the prefetching,
currently one image is downloaded at a time,
and skips images for failed downloads and proceed to the next image in the list</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImagePrefetcher.h</code><br />
</div>
</div>
</div>
</div>
<div class="main-navigation navigation-bottom">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2013 Olivier Poitrey. All rights reserved. (Last updated: 2013-04-02)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.1 (build 840)</a>.</span></p>
</div>
</div>
</div>
</article>
<script type="text/javascript">
function jumpToChange()
{
window.location.hash = this.options[this.selectedIndex].value;
}
function toggleTOC()
{
var contents = document.getElementById('contents');
var tocContainer = document.getElementById('tocContainer');
if (this.getAttribute('class') == 'open')
{
this.setAttribute('class', '');
contents.setAttribute('class', '');
tocContainer.setAttribute('class', '');
window.name = "hideTOC";
}
else
{
this.setAttribute('class', 'open');
contents.setAttribute('class', 'isShowingTOC');
tocContainer.setAttribute('class', 'isShowingTOC');
window.name = "";
}
return false;
}
function toggleTOCEntryChildren(e)
{
e.stopPropagation();
var currentClass = this.getAttribute('class');
if (currentClass == 'children') {
this.setAttribute('class', 'children open');
}
else if (currentClass == 'children open') {
this.setAttribute('class', 'children');
}
return false;
}
function tocEntryClick(e)
{
e.stopPropagation();
return true;
}
function init()
{
var selectElement = document.getElementById('jumpTo');
selectElement.addEventListener('change', jumpToChange, false);
var tocButton = document.getElementById('table_of_contents');
tocButton.addEventListener('click', toggleTOC, false);
var taskTreeItem = document.getElementById('task_treeitem');
if (taskTreeItem.getElementsByTagName('li').length > 0)
{
taskTreeItem.setAttribute('class', 'children');
taskTreeItem.firstChild.setAttribute('class', 'disclosure');
}
var tocList = document.getElementById('toc');
var tocEntries = tocList.getElementsByTagName('li');
for (var i = 0; i < tocEntries.length; i++) {
tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
}
var tocLinks = tocList.getElementsByTagName('a');
for (var i = 0; i < tocLinks.length; i++) {
tocLinks[i].addEventListener('click', tocEntryClick, false);
}
if (window.name == "hideTOC") {
toggleTOC.call(tocButton);
}
}
window.onload = init;
// If showing in Xcode, hide the TOC and Header
if (navigator.userAgent.match(/xcode/i)) {
document.getElementById("contents").className = "hideInXcode"
document.getElementById("tocContainer").className = "hideInXcode"
document.getElementById("top_header").className = "hideInXcode"
}
</script>
</body>
</html>

View File

@@ -0,0 +1,415 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
<title>SDWebImageManagerDelegate Protocol Reference</title>
<meta id="xcode-display" name="xcode-display" content="render"/>
<meta name="viewport" content="width=550" />
<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
<meta name="generator" content="appledoc 2.1 (build 840)" />
</head>
<body>
<header id="top_header">
<div id="library" class="hideInXcode">
<h1><a id="libraryTitle" href="../index.html">SDWebImage 3.2 </a></h1>
<a id="developerHome" href="../index.html">Olivier Poitrey</a>
</div>
<div id="title" role="banner">
<h1 class="hideInXcode">SDWebImageManagerDelegate Protocol Reference</h1>
</div>
<ul id="headerButtons" role="toolbar">
<li id="toc_button">
<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
</li>
<li id="jumpto_button" role="navigation">
<select id="jumpTo">
<option value="top">Jump To&#133;</option>
<option value="overview">Overview</option>
<option value="tasks">Tasks</option>
<option value="instance_methods">Instance Methods</option>
<option value="//api/name/imageManager:shouldDownloadImageForURL:">&nbsp;&nbsp;&nbsp;&nbsp;- imageManager:shouldDownloadImageForURL:</option>
<option value="//api/name/imageManager:transformDownloadedImage:withURL:">&nbsp;&nbsp;&nbsp;&nbsp;- imageManager:transformDownloadedImage:withURL:</option>
</select>
</li>
</ul>
</header>
<nav id="tocContainer" class="isShowingTOC">
<ul id="toc" role="tree">
<li role="treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#overview">Overview</a></span></li>
<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#instance_methods">Instance Methods</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/imageManager:shouldDownloadImageForURL:">imageManager:shouldDownloadImageForURL:</a></span></li>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/imageManager:transformDownloadedImage:withURL:">imageManager:transformDownloadedImage:withURL:</a></span></li>
</ul></li>
</ul>
</nav>
<article>
<div id="contents" class="isShowingTOC" role="main">
<a title="SDWebImageManagerDelegate Protocol Reference" name="top"></a>
<div class="main-navigation navigation-top">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="header">
<div class="section-header">
<h1 class="title title-header">SDWebImageManagerDelegate Protocol Reference</h1>
</div>
</div>
<div id="container">
<div class="section section-specification"><table cellspacing="0"><tbody>
<tr>
<td class="specification-title">Conforms to</td>
<td class="specification-value">NSObject</td>
</tr><tr>
<td class="specification-title">Declared in</td>
<td class="specification-value">SDWebImageManager.h</td>
</tr>
</tbody></table></div>
<div class="section section-overview">
<a title="Overview" name="overview"></a>
<h2 class="subtitle subtitle-overview">Overview</h2>
<p>Even if the image is cached, respect the HTTP response cache control, and refresh the image from remote location if needed.
The disk caching will be handled by NSURLCache instead of SDWebImage leading to slight performance degradation.
This option helps deal with images changing behind the same request URL, e.g. Facebook graph api profile pics.
If a cached image is refreshed, the completion block is called once with the cached image and again with the final image.</p>
<p>Use this flag only if you can&rsquo;t make your URLs static with embeded cache busting parameter.</p>
</div>
<div class="section section-tasks">
<a title="Tasks" name="tasks"></a>
<h2 class="subtitle subtitle-tasks">Tasks</h2>
<ul class="task-list">
<li>
<span class="tooltip">
<code><a href="#//api/name/imageManager:shouldDownloadImageForURL:">&ndash;&nbsp;imageManager:shouldDownloadImageForURL:</a></code>
<span class="tooltip"><p>Controls which image should be downloaded when the image is not found in the cache.</p></span>
</span>
</li><li>
<span class="tooltip">
<code><a href="#//api/name/imageManager:transformDownloadedImage:withURL:">&ndash;&nbsp;imageManager:transformDownloadedImage:withURL:</a></code>
<span class="tooltip"><p>Allows to transform the image immediately after it has been downloaded and just before to cache it on disk and memory.
NOTE: This method is called from a global queue in order to not to block the main thread.</p></span>
</span>
</li>
</ul>
</div>
<div class="section section-methods">
<a title="Instance Methods" name="instance_methods"></a>
<h2 class="subtitle subtitle-methods">Instance Methods</h2>
<div class="section-method">
<a name="//api/name/imageManager:shouldDownloadImageForURL:" title="imageManager:shouldDownloadImageForURL:"></a>
<h3 class="subsubtitle method-title">imageManager:shouldDownloadImageForURL:</h3>
<div class="method-subsection brief-description">
<p>Controls which image should be downloaded when the image is not found in the cache.</p>
</div>
<div class="method-subsection method-declaration"><code>- (BOOL)imageManager:(SDWebImageManager *)<em>imageManager</em> shouldDownloadImageForURL:(NSURL *)<em>imageURL</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>imageManager</em></dt>
<dd><p>The current <a href="../Classes/SDWebImageManager.html"><code>SDWebImageManager</code></a></p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>imageURL</em></dt>
<dd><p>The url of the image to be downloaded</p></dd>
</dl>
</div>
<div class="method-subsection return">
<h4 class="method-subtitle parameter-title">Return Value</h4>
<p>Return NO to prevent the downloading of the image on cache misses. If not implemented, YES is implied.</p>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Controls which image should be downloaded when the image is not found in the cache.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImageManager.h</code><br />
</div>
</div>
<div class="section-method">
<a name="//api/name/imageManager:transformDownloadedImage:withURL:" title="imageManager:transformDownloadedImage:withURL:"></a>
<h3 class="subsubtitle method-title">imageManager:transformDownloadedImage:withURL:</h3>
<div class="method-subsection brief-description">
<p>Allows to transform the image immediately after it has been downloaded and just before to cache it on disk and memory.
NOTE: This method is called from a global queue in order to not to block the main thread.</p>
</div>
<div class="method-subsection method-declaration"><code>- (UIImage *)imageManager:(SDWebImageManager *)<em>imageManager</em> transformDownloadedImage:(UIImage *)<em>image</em> withURL:(NSURL *)<em>imageURL</em></code></div>
<div class="method-subsection arguments-section parameters">
<h4 class="method-subtitle parameter-title">Parameters</h4>
<dl class="argument-def parameter-def">
<dt><em>imageManager</em></dt>
<dd><p>The current <a href="../Classes/SDWebImageManager.html"><code>SDWebImageManager</code></a></p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>image</em></dt>
<dd><p>The image to transform</p></dd>
</dl>
<dl class="argument-def parameter-def">
<dt><em>imageURL</em></dt>
<dd><p>The url of the image to transform</p></dd>
</dl>
</div>
<div class="method-subsection return">
<h4 class="method-subtitle parameter-title">Return Value</h4>
<p>The transformed image object.</p>
</div>
<div class="method-subsection discussion-section">
<h4 class="method-subtitle">Discussion</h4>
<p>Allows to transform the image immediately after it has been downloaded and just before to cache it on disk and memory.
NOTE: This method is called from a global queue in order to not to block the main thread.</p>
</div>
<div class="method-subsection declared-in-section">
<h4 class="method-subtitle">Declared In</h4>
<code class="declared-in-ref">SDWebImageManager.h</code><br />
</div>
</div>
</div>
</div>
<div class="main-navigation navigation-bottom">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2013 Olivier Poitrey. All rights reserved. (Last updated: 2013-04-02)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.1 (build 840)</a>.</span></p>
</div>
</div>
</div>
</article>
<script type="text/javascript">
function jumpToChange()
{
window.location.hash = this.options[this.selectedIndex].value;
}
function toggleTOC()
{
var contents = document.getElementById('contents');
var tocContainer = document.getElementById('tocContainer');
if (this.getAttribute('class') == 'open')
{
this.setAttribute('class', '');
contents.setAttribute('class', '');
tocContainer.setAttribute('class', '');
window.name = "hideTOC";
}
else
{
this.setAttribute('class', 'open');
contents.setAttribute('class', 'isShowingTOC');
tocContainer.setAttribute('class', 'isShowingTOC');
window.name = "";
}
return false;
}
function toggleTOCEntryChildren(e)
{
e.stopPropagation();
var currentClass = this.getAttribute('class');
if (currentClass == 'children') {
this.setAttribute('class', 'children open');
}
else if (currentClass == 'children open') {
this.setAttribute('class', 'children');
}
return false;
}
function tocEntryClick(e)
{
e.stopPropagation();
return true;
}
function init()
{
var selectElement = document.getElementById('jumpTo');
selectElement.addEventListener('change', jumpToChange, false);
var tocButton = document.getElementById('table_of_contents');
tocButton.addEventListener('click', toggleTOC, false);
var taskTreeItem = document.getElementById('task_treeitem');
if (taskTreeItem.getElementsByTagName('li').length > 0)
{
taskTreeItem.setAttribute('class', 'children');
taskTreeItem.firstChild.setAttribute('class', 'disclosure');
}
var tocList = document.getElementById('toc');
var tocEntries = tocList.getElementsByTagName('li');
for (var i = 0; i < tocEntries.length; i++) {
tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
}
var tocLinks = tocList.getElementsByTagName('a');
for (var i = 0; i < tocLinks.length; i++) {
tocLinks[i].addEventListener('click', tocEntryClick, false);
}
if (window.name == "hideTOC") {
toggleTOC.call(tocButton);
}
}
window.onload = init;
// If showing in Xcode, hide the TOC and Header
if (navigator.userAgent.match(/xcode/i)) {
document.getElementById("contents").className = "hideInXcode"
document.getElementById("tocContainer").className = "hideInXcode"
document.getElementById("top_header").className = "hideInXcode"
}
</script>
</body>
</html>

View File

@@ -0,0 +1,268 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
<title>SDWebImageOperation Protocol Reference</title>
<meta id="xcode-display" name="xcode-display" content="render"/>
<meta name="viewport" content="width=550" />
<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
<meta name="generator" content="appledoc 2.1 (build 840)" />
</head>
<body>
<header id="top_header">
<div id="library" class="hideInXcode">
<h1><a id="libraryTitle" href="../index.html">SDWebImage 3.2 </a></h1>
<a id="developerHome" href="../index.html">Olivier Poitrey</a>
</div>
<div id="title" role="banner">
<h1 class="hideInXcode">SDWebImageOperation Protocol Reference</h1>
</div>
<ul id="headerButtons" role="toolbar">
<li id="toc_button">
<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
</li>
<li id="jumpto_button" role="navigation">
<select id="jumpTo">
<option value="top">Jump To&#133;</option>
<option value="tasks">Tasks</option>
<option value="instance_methods">Instance Methods</option>
<option value="//api/name/cancel">&nbsp;&nbsp;&nbsp;&nbsp;- cancel</option>
</select>
</li>
</ul>
</header>
<nav id="tocContainer" class="isShowingTOC">
<ul id="toc" role="tree">
<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
</ul></li>
<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#instance_methods">Instance Methods</a></span><ul>
<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/cancel">cancel</a></span></li>
</ul></li>
</ul>
</nav>
<article>
<div id="contents" class="isShowingTOC" role="main">
<a title="SDWebImageOperation Protocol Reference" name="top"></a>
<div class="main-navigation navigation-top">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="header">
<div class="section-header">
<h1 class="title title-header">SDWebImageOperation Protocol Reference</h1>
</div>
</div>
<div id="container">
<div class="section section-specification"><table cellspacing="0"><tbody>
<tr>
<td class="specification-title">Conforms to</td>
<td class="specification-value">NSObject</td>
</tr><tr>
<td class="specification-title">Declared in</td>
<td class="specification-value">SDWebImageOperation.h</td>
</tr>
</tbody></table></div>
<div class="section section-tasks">
<a title="Tasks" name="tasks"></a>
<h2 class="subtitle subtitle-tasks">Tasks</h2>
<ul class="task-list">
<li>
<span class="tooltip">
<code><a href="#//api/name/cancel">&ndash;&nbsp;cancel</a></code>
</span>
<span class="task-item-suffix">required method</span>
</li>
</ul>
</div>
<div class="section section-methods">
<a title="Instance Methods" name="instance_methods"></a>
<h2 class="subtitle subtitle-methods">Instance Methods</h2>
<div class="section-method">
<a name="//api/name/cancel" title="cancel"></a>
<h3 class="subsubtitle method-title">cancel</h3>
<div class="method-subsection method-declaration"><code>- (void)cancel</code></div>
</div>
</div>
</div>
<div class="main-navigation navigation-bottom">
<ul>
<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
</div>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2013 Olivier Poitrey. All rights reserved. (Last updated: 2013-04-02)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.1 (build 840)</a>.</span></p>
</div>
</div>
</div>
</article>
<script type="text/javascript">
function jumpToChange()
{
window.location.hash = this.options[this.selectedIndex].value;
}
function toggleTOC()
{
var contents = document.getElementById('contents');
var tocContainer = document.getElementById('tocContainer');
if (this.getAttribute('class') == 'open')
{
this.setAttribute('class', '');
contents.setAttribute('class', '');
tocContainer.setAttribute('class', '');
window.name = "hideTOC";
}
else
{
this.setAttribute('class', 'open');
contents.setAttribute('class', 'isShowingTOC');
tocContainer.setAttribute('class', 'isShowingTOC');
window.name = "";
}
return false;
}
function toggleTOCEntryChildren(e)
{
e.stopPropagation();
var currentClass = this.getAttribute('class');
if (currentClass == 'children') {
this.setAttribute('class', 'children open');
}
else if (currentClass == 'children open') {
this.setAttribute('class', 'children');
}
return false;
}
function tocEntryClick(e)
{
e.stopPropagation();
return true;
}
function init()
{
var selectElement = document.getElementById('jumpTo');
selectElement.addEventListener('change', jumpToChange, false);
var tocButton = document.getElementById('table_of_contents');
tocButton.addEventListener('click', toggleTOC, false);
var taskTreeItem = document.getElementById('task_treeitem');
if (taskTreeItem.getElementsByTagName('li').length > 0)
{
taskTreeItem.setAttribute('class', 'children');
taskTreeItem.firstChild.setAttribute('class', 'disclosure');
}
var tocList = document.getElementById('toc');
var tocEntries = tocList.getElementsByTagName('li');
for (var i = 0; i < tocEntries.length; i++) {
tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
}
var tocLinks = tocList.getElementsByTagName('a');
for (var i = 0; i < tocLinks.length; i++) {
tocLinks[i].addEventListener('click', tocEntryClick, false);
}
if (window.name == "hideTOC") {
toggleTOC.call(tocButton);
}
}
window.onload = init;
// If showing in Xcode, hide the TOC and Header
if (navigator.userAgent.match(/xcode/i)) {
document.getElementById("contents").className = "hideInXcode"
document.getElementById("tocContainer").className = "hideInXcode"
document.getElementById("top_header").className = "hideInXcode"
}
</script>
</body>
</html>

View File

@@ -0,0 +1,584 @@
body {
font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
font-size: 13px;
}
code {
font-family: Courier, Consolas, monospace;
font-size: 13px;
color: #666;
}
pre {
font-family: Courier, Consolas, monospace;
font-size: 13px;
line-height: 18px;
tab-interval: 0.5em;
border: 1px solid #C7CFD5;
background-color: #F1F5F9;
color: #666;
padding: 0.3em 1em;
}
ul {
list-style-type: square;
}
li {
margin-bottom: 10px;
}
a, a code {
text-decoration: none;
color: #36C;
}
a:hover, a:hover code {
text-decoration: underline;
color: #36C;
}
h2 {
border-bottom: 1px solid #8391A8;
color: #3C4C6C;
font-size: 187%;
font-weight: normal;
margin-top: 1.75em;
padding-bottom: 2px;
}
table {
margin-bottom: 4em;
border-collapse:collapse;
vertical-align: middle;
}
td {
border: 1px solid #9BB3CD;
padding: .667em;
font-size: 100%;
}
th {
border: 1px solid #9BB3CD;
padding: .3em .667em .3em .667em;
background: #93A5BB;
font-size: 103%;
font-weight: bold;
color: white;
text-align: left;
}
/* @group Common page elements */
#top_header {
height: 91px;
left: 0;
min-width: 598px;
position: absolute;
right: 0;
top: 0;
z-index: 900;
}
#footer {
clear: both;
padding-top: 20px;
text-align: center;
}
#contents, #overview_contents {
-webkit-overflow-scrolling: touch;
border-top: 1px solid #2B334F;
position: absolute;
top: 91px;
left: 0;
right: 0;
bottom: 0;
overflow-x: hidden;
overflow-y: auto;
padding-left: 2em;
padding-right: 2em;
padding-top: 1em;
min-width: 550px;
}
#contents.isShowingTOC {
left: 230px;
min-width: 320px;
}
.copyright {
font-size: 12px;
}
.generator {
font-size: 11px;
}
.main-navigation ul li {
display: inline;
margin-left: 15px;
list-style: none;
}
.navigation-top {
clear: both;
float: right;
}
.navigation-bottom {
clear: both;
float: right;
margin-top: 20px;
margin-bottom: -10px;
}
.open > .disclosure {
background-image: url("../img/disclosure_open.png");
}
.disclosure {
background: url("../img/disclosure.png") no-repeat scroll 0 0;
}
.disclosure, .nodisclosure {
display: inline-block;
height: 8px;
margin-right: 5px;
position: relative;
width: 9px;
}
/* @end */
/* @group Header */
#top_header #library {
background: url("../img/library_background.png") repeat-x 0 0 #485E78;
background-color: #ccc;
height: 35px;
font-size: 115%;
}
#top_header #library #libraryTitle {
color: #FFFFFF;
margin-left: 15px;
text-shadow: 0 -1px 0 #485E78;
top: 8px;
position: absolute;
}
#top_header #library #developerHome {
color: #92979E;
right: 15px;
top: 8px;
position: absolute;
}
#top_header #library a:hover {
text-decoration: none;
}
#top_header #title {
background: url("../img/title_background.png") repeat-x 0 0 #8A98A9;
border-bottom: 1px solid #B6B6B6;
height: 25px;
overflow: hidden;
}
#top_header h1 {
font-size: 115%;
font-weight: normal;
margin: 0;
padding: 3px 0 2px;
text-align: center;
text-shadow: 0 1px 0 #D5D5D5;
white-space: nowrap;
}
#headerButtons {
background-color: #D8D8D8;
background-image: url("../img/button_bar_background.png");
border-bottom: 1px solid #EDEDED;
border-top: 1px solid #2B334F;
font-size: 8pt;
height: 28px;
left: 0;
list-style: none outside none;
margin: 0;
overflow: hidden;
padding: 0;
position: absolute;
right: 0;
top: 61px;
}
#headerButtons li {
background-repeat: no-repeat;
display: inline;
margin-top: 0;
margin-bottom: 0;
padding: 0;
}
#toc_button button {
border-color: #ACACAC;
border-style: none solid none none;
border-width: 0 1px 0 0;
height: 28px;
margin: 0;
padding-left: 30px;
text-align: left;
width: 230px;
}
li#jumpto_button {
left: 230px;
margin-left: 0;
position: absolute;
}
li#jumpto_button select {
height: 22px;
margin: 5px 2px 0 10px;
max-width: 300px;
}
/* @end */
/* @group Table of contents */
#tocContainer.isShowingTOC {
border-right: 1px solid #ACACAC;
display: block;
overflow-x: hidden;
overflow-y: auto;
padding: 0;
}
#tocContainer {
background-color: #E4EBF7;
border-top: 1px solid #2B334F;
bottom: 0;
display: none;
left: 0;
overflow: hidden;
position: absolute;
top: 91px;
width: 229px;
}
#tocContainer > ul#toc {
font-size: 11px;
margin: 0;
padding: 12px 0 18px;
width: 209px;
-moz-user-select: none;
-webkit-user-select: none;
user-select: none;
}
#tocContainer > ul#toc > li {
margin: 0;
padding: 0 0 7px 30px;
text-indent: -15px;
}
#tocContainer > ul#toc > li > .sectionName a {
color: #000000;
font-weight: bold;
}
#tocContainer > ul#toc > li > .sectionName a:hover {
text-decoration: none;
}
#tocContainer > ul#toc li.children > ul {
display: none;
height: 0;
}
#tocContainer > ul#toc > li > ul {
margin: 0;
padding: 0;
}
#tocContainer > ul#toc > li > ul, ul#toc > li > ul > li {
margin-left: 0;
margin-bottom: 0;
padding-left: 15px;
}
#tocContainer > ul#toc > li ul {
list-style: none;
margin-right: 0;
padding-right: 0;
}
#tocContainer > ul#toc li.children.open > ul {
display: block;
height: auto;
margin-left: -15px;
padding-left: 0;
}
#tocContainer > ul#toc > li > ul, ul#toc > li > ul > li {
margin-left: 0;
padding-left: 15px;
}
#tocContainer li ul li {
margin-top: 0.583em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
#tocContainer li ul li span.sectionName {
white-space: normal;
}
#tocContainer > ul#toc > li > ul > li > .sectionName a {
font-weight: bold;
}
#tocContainer > ul#toc > li > ul a {
color: #4F4F4F;
}
/* @end */
/* @group Index formatting */
.index-title {
font-size: 13px;
font-weight: normal;
}
.index-column {
float: left;
width: 30%;
min-width: 200px;
font-size: 11px;
}
.index-column ul {
margin: 8px 0 0 0;
padding: 0;
list-style: none;
}
.index-column ul li {
margin: 0 0 3px 0;
padding: 0;
}
.hierarchy-column {
min-width: 400px;
}
.hierarchy-column ul {
margin: 3px 0 0 15px;
}
.hierarchy-column ul li {
list-style-type: square;
}
/* @end */
/* @group Common formatting elements */
.title {
font-weight: normal;
font-size: 215%;
margin-top:0;
}
.subtitle {
font-weight: normal;
font-size: 180%;
color: #3C4C6C;
border-bottom: 1px solid #5088C5;
}
.subsubtitle {
font-weight: normal;
font-size: 145%;
height: 0.7em;
}
.note {
border: 1px solid #5088C5;
background-color: white;
margin: 1.667em 0 1.75em 0;
padding: 0 .667em .083em .750em;
}
.warning {
border: 1px solid #5088C5;
background-color: #F0F3F7;
margin-bottom: 0.5em;
padding: 0.3em 0.8em;
}
.bug {
border: 1px solid #000;
background-color: #ffffcc;
margin-bottom: 0.5em;
padding: 0.3em 0.8em;
}
.deprecated {
color: #F60425;
}
/* @end */
/* @group Common layout */
.section {
margin-top: 3em;
}
/* @end */
/* @group Object specification section */
.section-specification {
margin-left: 2.5em;
margin-right: 2.5em;
font-size: 12px;
}
.section-specification table {
margin-bottom: 0em;
border-top: 1px solid #d6e0e5;
}
.section-specification td {
vertical-align: top;
border-bottom: 1px solid #d6e0e5;
border-left-width: 0px;
border-right-width: 0px;
border-top-width: 0px;
padding: .6em;
}
.section-specification .specification-title {
font-weight: bold;
}
/* @end */
/* @group Tasks section */
.task-list {
list-style-type: none;
padding-left: 0px;
}
.task-list li {
margin-bottom: 3px;
}
.task-item-suffix {
color: #996;
font-size: 12px;
font-style: italic;
margin-left: 0.5em;
}
span.tooltip span.tooltip {
font-size: 1.0em;
display: none;
padding: 0.3em;
border: 1px solid #aaa;
background-color: #fdfec8;
color: #000;
text-align: left;
}
span.tooltip:hover span.tooltip {
display: block;
position: absolute;
margin-left: 2em;
}
/* @end */
/* @group Method section */
.section-method {
margin-top: 2.3em;
}
.method-title {
margin-bottom: 1.5em;
}
.method-subtitle {
margin-top: 0.7em;
margin-bottom: 0.2em;
}
.method-subsection p {
margin-top: 0.4em;
margin-bottom: 0.8em;
}
.method-declaration {
margin-top:1.182em;
margin-bottom:.909em;
}
.method-declaration code {
font:14px Courier, Consolas, monospace;
color:#000;
}
.declaration {
color: #000;
}
.argument-def {
margin-top: 0.3em;
margin-bottom: 0.3em;
}
.argument-def dd {
margin-left: 1.25em;
}
.see-also-section ul {
list-style-type: none;
padding-left: 0px;
margin-top: 0;
}
.see-also-section li {
margin-bottom: 3px;
}
.declared-in-ref {
color: #666;
}
#tocContainer.hideInXcode {
display: none;
border: 0px solid black;
}
#top_header.hideInXcode {
display: none;
}
#contents.hideInXcode {
border: 0px solid black;
top: 0px;
left: 0px;
}
/* @end */

View File

@@ -0,0 +1,22 @@
header {
display: none;
}
div.main-navigation, div.navigation-top {
display: none;
}
div#overview_contents, div#contents.isShowingTOC, div#contents {
overflow: visible;
position: relative;
top: 0px;
border: none;
left: 0;
}
#tocContainer.isShowingTOC {
display: none;
}
nav {
display: none;
}

View File

@@ -0,0 +1,111 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SDWebImage 3.2 Hierarchy</title>
<link rel="stylesheet" type="text/css" href="css/styles.css" media="all" />
<link rel="stylesheet" type="text/css" media="print" href="css/stylesPrint.css" />
<meta name="generator" content="appledoc 2.1 (build 840)" />
</head>
<body>
<header id="top_header">
<div id="library" class="hideInXcode">
<h1><a id="libraryTitle" href="index.html">SDWebImage 3.2 </a></h1>
<a id="developerHome" href="index.html">Olivier Poitrey</a>
</div>
<div id="title" role="banner">
<h1 class="hideInXcode">SDWebImage 3.2 Hierarchy</h1>
</div>
<ul id="headerButtons" role="toolbar"></ul>
</header>
<article>
<div id="overview_contents" role="main">
<div class="main-navigation navigation-top">
<a href="index.html">Previous</a>
</div>
<div id="header">
<div class="section-header">
<h1 class="title title-header">SDWebImage 3.2 Hierarchy</h1>
</div>
</div>
<div id="container">
<div class="index-column hierarchy-column">
<h2 class="index-title">Class Hierarchy</h2>
<ul>
<li>NSObject
<ul>
<li><a href="Classes/SDImageCache.html">SDImageCache</a></li>
<li><a href="Classes/SDWebImageDownloader.html">SDWebImageDownloader</a></li>
<li><a href="Classes/SDWebImageManager.html">SDWebImageManager</a></li>
<li><a href="Classes/SDWebImagePrefetcher.html">SDWebImagePrefetcher</a></li>
</ul>
</li>
<li>NSOperation
<ul>
<li><a href="Classes/SDWebImageDownloaderOperation.html">SDWebImageDownloaderOperation</a></li>
</ul>
</li>
</ul>
</div>
<div class="index-column">
<h2 class="index-title">Protocol References</h2>
<ul>
<li><a href="Protocols/SDWebImageManagerDelegate.html">SDWebImageManagerDelegate</a></li>
<li><a href="Protocols/SDWebImageOperation.html">SDWebImageOperation</a></li>
</ul>
<h2 class="index-title">Category References</h2>
<ul>
<li><a href="Categories/MKAnnotationView+WebCache.html">MKAnnotationView(WebCache)</a></li>
<li><a href="Categories/UIButton+WebCache.html">UIButton(WebCache)</a></li>
<li><a href="Categories/UIImage+ForceDecode.html">UIImage(ForceDecode)</a></li>
<li><a href="Categories/UIImageView+WebCache.html">UIImageView(WebCache)</a></li>
</ul>
</div>
</div>
<div class="main-navigation navigation-bottom">
<a href="index.html">Previous</a>
</div>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2013 Olivier Poitrey. All rights reserved. (Last updated: 2013-04-02)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.1 (build 840)</a>.</span></p>
</div>
</div>
</div>
</article>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 B

View File

@@ -0,0 +1,371 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SDWebImage 3.2 Reference</title>
<link rel="stylesheet" type="text/css" href="css/styles.css" media="all" />
<link rel="stylesheet" type="text/css" media="print" href="css/stylesPrint.css" />
<meta name="generator" content="appledoc 2.1 (build 840)" />
</head>
<body>
<header id="top_header">
<div id="library" class="hideInXcode">
<h1><a id="libraryTitle" href="index.html">SDWebImage 3.2 </a></h1>
<a id="developerHome" href="index.html">Olivier Poitrey</a>
</div>
<div id="title" role="banner">
<h1 class="hideInXcode">SDWebImage 3.2 Reference</h1>
</div>
<ul id="headerButtons" role="toolbar"></ul>
</header>
<article>
<div id="overview_contents" role="main">
<div class="main-navigation navigation-top">
<a href="hierarchy.html">Next</a>
</div>
<div id="header">
<div class="section-header">
<h1 class="title title-header">SDWebImage 3.2 Reference</h1>
</div>
</div>
<div id="container">
<div class="section section-overview index-overview">
<h1>Web Image</h1>
<p>This library provides a category for UIImageVIew with support for remote images coming from the web.</p>
<p>It provides:</p>
<ul>
<li>An UIImageView category adding web image and cache management to the Cocoa Touch framework</li>
<li>An asynchronous image downloader</li>
<li>An asynchronous memory + disk image caching with automatic cache expiration handling</li>
<li>A background image decompression</li>
<li>A guarantee that the same URL won&rsquo;t be downloaded several times</li>
<li>A guarantee that bogus URLs won&rsquo;t be retried again and again</li>
<li>A guarantee that main thread will never be blocked</li>
<li>Performances!</li>
<li>Use GCD and ARC</li>
</ul>
<p>NOTE: The version 3.0 of SDWebImage isn&rsquo;t fully backward compatible with 2.0 and requires iOS 5.0
minimum deployement version. If you need iOS &lt; 5.0 support, please use the last <a href="https://github.com/rs/SDWebImage/tree/2.0-compat">2.0 version</a>.</p>
<p><a href="https://github.com/rs/SDWebImage/wiki/How-is-SDWebImage-better-than-X%3F">How is SDWebImage better than X?</a></p>
<h2>Who Use It</h2>
<p>Find out <a href="https://github.com/rs/SDWebImage/wiki/Who-Use-SDWebImage">who use SDWebImage</a> and add your app to the list.</p>
<h2>How To Use</h2>
<p>API documentation is available at <a href="http://hackemist.com/SDWebImage/doc/">http://hackemist.com/SDWebImage/doc/</a></p>
<h3>Using UIImageView+WebCache category with UITableView</h3>
<p>Just #import the UIImageView+WebCache.h header, and call the setImageWithURL:placeholderImage:
method from the tableView:cellForRowAtIndexPath: UITableViewDataSource method. Everything will be
handled for you, from async downloads to caching management.</p>
<p>```objective-c</p>
<h1>import &lt;SDWebImage/UIImageView+WebCache.h></h1>
<p>&hellip;</p>
<ul>
<li><p>(UITableViewCell <em>)tableView:(UITableView </em>)tableView cellForRowAtIndexPath:(NSIndexPath <em>)indexPath
{
static NSString </em>MyIdentifier = @&ldquo;MyIdentifier&rdquo;;</p>
<p> UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier];</p>
<p> if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
reuseIdentifier:MyIdentifier] autorelease];
}</p>
<p> // Here we use the new provided setImageWithURL: method to load the web image
[cell.imageView setImageWithURL:[NSURL URLWithString:@&ldquo;<a href="http://www.domain.com/path/to/image.jpg">http://www.domain.com/path/to/image.jpg</a>&rdquo;]
placeholderImage:[UIImage imageNamed:@&ldquo;placeholder.png&rdquo;]];</p>
<p> cell.textLabel.text = @&ldquo;My Text&rdquo;;
return cell;
}
```</p></li>
</ul>
<h3>Using blocks</h3>
<p>With blocks, you can be notified about the image download progress and whenever the image retrival
has completed with success or not:</p>
<p>```objective-c
// Here we use the new provided setImageWithURL: method to load the web image
[cell.imageView setImageWithURL:[NSURL URLWithString:@&ldquo;<a href="http://www.domain.com/path/to/image.jpg">http://www.domain.com/path/to/image.jpg</a>&rdquo;]</p>
<pre><code> placeholderImage:[UIImage imageNamed:@"placeholder.png"]
completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType) {... completion code here ...}];
</code></pre>
<p>```</p>
<p>Note: neither your success nor failure block will be call if your image request is canceled before completion.</p>
<h3>Using <a href="Classes/SDWebImageManager.html">SDWebImageManager</a></h3>
<p>The <a href="Classes/SDWebImageManager.html">SDWebImageManager</a> is the class behind the UIImageView+WebCache category. It ties the
asynchronous downloader with the image cache store. You can use this class directly to benefit
from web image downloading with caching in another context than a UIView (ie: with Cocoa).</p>
<p>Here is a simple example of how to use <a href="Classes/SDWebImageManager.html">SDWebImageManager</a>:</p>
<p>```objective-c
<a href="Classes/SDWebImageManager.html">SDWebImageManager</a> *manager = <a href="Classes/SDWebImageManager.html#//api/name/sharedManager">[SDWebImageManager sharedManager]</a>;
[manager downloadWithURL:imageURL</p>
<pre><code> options:0
progress:^(NSUInteger receivedSize, long long expectedSize)
{
// progression tracking code
}
completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType)
{
if (image)
{
// do something with image
}
}];
</code></pre>
<p>```</p>
<h3>Using Asynchronous Image Downloader Independently</h3>
<p>It&rsquo;s also possible to use the async image downloader independently:</p>
<p>```objective-c
[<a href="Classes/SDWebImageDownloader.html">SDWebImageDownloader</a>.sharedDownloader downloadImageWithURL:imageURL</p>
<pre><code> options:0
progress:^(NSUInteger receivedSize, long long expectedSize)
{
// progression tracking code
}
completed:^(UIImage *image, NSError *error, BOOL finished)
{
if (image &amp;&amp; finished)
{
// do something with image
}
}];
</code></pre>
<p>```</p>
<h3>Using Asynchronous Image Caching Independently</h3>
<p>It is also possible to use the aync based image cache store independently. <a href="Classes/SDImageCache.html">SDImageCache</a>
maintains a memory cache and an optional disk cache. Disk cache write operations are performed
asynchronous so it doesn&rsquo;t add unnecessary latency to the UI.</p>
<p>The <a href="Classes/SDImageCache.html">SDImageCache</a> class provides a singleton instance for convenience but you can create your own
instance if you want to create separated cache namespace.</p>
<p>To lookup the cache, you use the imageForKey: method. If the method returns nil, it means the cache
doesn&rsquo;t currently own the image. You are thus responsible for generating and caching it. The cache
key is an application unique identifier for the image to cache. It is generally the absolute URL of
the image.</p>
<p>```objective-c
<a href="Classes/SDImageCache.html">SDImageCache</a> <em>imageCache = [SDImageCache.alloc initWithNamespace:@&ldquo;myNamespace&rdquo;];
[imageCache queryDiskCacheForKey:myCacheKey done:^(UIImage </em>image)
{</p>
<pre><code>// image is not nil if image was found
</code></pre>
<p>}];
```</p>
<p>By default <a href="Classes/SDImageCache.html">SDImageCache</a> will lookup the disk cache if an image can&rsquo;t be found in the memory cache.
You can prevent this from happening by calling the alternative method <code>imageFromMemoryCacheForKey:</code>.</p>
<p>To store an image into the cache, you use the storeImage:forKey: method:</p>
<p><code>objective-c
[[SDImageCache sharedImageCache] storeImage:myImage forKey:myCacheKey];
</code></p>
<p>By default, the image will be stored in memory cache as well as on disk cache (asynchronously). If
you want only the memory cache, use the alternative method storeImage:forKey:toDisk: with a negative
third argument.</p>
<h3>Using cache key filter</h3>
<p>Sometime, you may not want to use the image URL as cache key because part of the URL is dynamic
(i.e.: for access control purpose). <a href="Classes/SDWebImageManager.html">SDWebImageManager</a> provides a way to set a cache key filter that
takes the NSURL as input, and output a cache key NSString.</p>
<p>The following example sets a filter in the application delegate that will remove any query-string from
the URL before to use it as a cache key:</p>
<p>```objective-c
&ndash; (BOOL)application:(UIApplication <em>)application didFinishLaunchingWithOptions:(NSDictionary </em>)launchOptions
{</p>
<pre><code>SDWebImageManager.sharedManager.cacheKeyFilter:^(NSURL *url)
{
url = [[[NSURL alloc] initWithScheme:url.scheme host:url.host path:url.path] autorelease];
return [url absoluteString];
};
// Your app init code...
return YES;
</code></pre>
<p>}
```</p>
<h2>Common Problems</h2>
<h3>Using dynamic image size with UITableViewCell</h3>
<p>UITableView determins the size of the image by the first image set for a cell. If your remote images
don&rsquo;t have the same size as your placeholder image, you may experience strange anamorphic scaling issue.
The following article gives a way to workaround this issue:</p>
<p><a href="http://www.wrichards.com/blog/2011/11/sdwebimage-fixed-width-cell-images/">http://www.wrichards.com/blog/2011/11/sdwebimage-fixed-width-cell-images/</a></p>
<h2>Installation</h2>
<p>There are two ways to use this in your project: copy all the files into your project, or import the project as a static library.</p>
<h3>Add the SDWebImage project to your project</h3>
<ul>
<li>Download and unzip the last version of the framework from the <a href="https://github.com/rs/SDWebImage/wiki/Download-Complied-Framework">download page</a></li>
<li>Right-click on the project navigator and select &ldquo;Add Files to "Your Project&rdquo;:</li>
<li>In the dialog, select SDWebImage.framework:</li>
<li>Check the &ldquo;Copy items into destination group&rsquo;s folder (if needed)&rdquo; checkbox</li>
</ul>
<h3>Add dependencies</h3>
<ul>
<li>In you application project apps target settings, find the &ldquo;Build Phases&rdquo; section and open the &ldquo;Link Binary With Libraries&rdquo; block:</li>
<li>Click the &ldquo;+&rdquo; button again and select the &ldquo;ImageIO.framework&rdquo;, this is needed by the progressive download feature:</li>
</ul>
<h3>Add Linker Flag</h3>
<p>Open the &ldquo;Build Settings&rdquo; tab, in the &ldquo;Linking&rdquo; section, locate the &ldquo;Other Linker Flags&rdquo; setting and add the &ldquo;-ObjC&rdquo; flag:</p>
<p><img src="[http://dl.dropbox.com/u/123346/SDWebImage/10](http://dl.dropbox.com/u/123346/SDWebImage/10" alt="Other Linker Flags" />_other_linker_flags.jpg)</p>
<h3>Import headers in your source files</h3>
<p>In the source files where you need to use the library, import the header file:</p>
<p>```objective-c</p>
<h1>import &lt;SDWebImage/UIImageView+WebCache.h></h1>
<p>```</p>
<h3>Build Project</h3>
<p>At this point your workspace should build without error. If you are having problem, post to the Issue and the
community can help you solve it.</p>
<h2>Future Enhancements</h2>
<ul>
<li>LRU memory cache cleanup instead of reset on memory warning</li>
</ul>
<h2>Licenses</h2>
<p>All source code is licensed under the <a href="https://raw.github.com/rs/SDWebImage/master/LICENSE">MIT License</a>.</p>
</div>
<div class="index-column">
<h2 class="index-title">Class References</h2>
<ul>
<li><a href="Classes/SDImageCache.html">SDImageCache</a></li>
<li><a href="Classes/SDWebImageDownloader.html">SDWebImageDownloader</a></li>
<li><a href="Classes/SDWebImageDownloaderOperation.html">SDWebImageDownloaderOperation</a></li>
<li><a href="Classes/SDWebImageManager.html">SDWebImageManager</a></li>
<li><a href="Classes/SDWebImagePrefetcher.html">SDWebImagePrefetcher</a></li>
</ul>
</div>
<div class="index-column">
<h2 class="index-title">Protocol References</h2>
<ul>
<li><a href="Protocols/SDWebImageManagerDelegate.html">SDWebImageManagerDelegate</a></li>
<li><a href="Protocols/SDWebImageOperation.html">SDWebImageOperation</a></li>
</ul>
<h2 class="index-title">Category References</h2>
<ul>
<li><a href="Categories/MKAnnotationView+WebCache.html">MKAnnotationView(WebCache)</a></li>
<li><a href="Categories/UIButton+WebCache.html">UIButton(WebCache)</a></li>
<li><a href="Categories/UIImage+ForceDecode.html">UIImage(ForceDecode)</a></li>
<li><a href="Categories/UIImageView+WebCache.html">UIImageView(WebCache)</a></li>
</ul>
</div>
</div>
<div class="main-navigation navigation-bottom">
<a href="hierarchy.html">Next</a>
</div>
<div id="footer">
<hr />
<div class="footer-copyright">
<p><span class="copyright">&copy; 2013 Olivier Poitrey. All rights reserved. (Last updated: 2013-04-02)</span><br />
<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.1 (build 840)</a>.</span></p>
</div>
</div>
</div>
</article>
</body>
</html>

View File

@@ -0,0 +1 @@
../../SDWebImage/SDWebImage/MKAnnotationView+WebCache.h

View File

@@ -0,0 +1 @@
../../SDWebImage/SDWebImage/SDImageCache.h

View File

@@ -0,0 +1 @@
../../SDWebImage/SDWebImage/SDWebImageCompat.h

View File

@@ -0,0 +1 @@
../../SDWebImage/SDWebImage/SDWebImageDecoder.h

View File

@@ -0,0 +1 @@
../../SDWebImage/SDWebImage/SDWebImageDownloader.h

View File

@@ -0,0 +1 @@
../../SDWebImage/SDWebImage/SDWebImageDownloaderOperation.h

View File

@@ -0,0 +1 @@
../../SDWebImage/SDWebImage/SDWebImageManager.h

View File

@@ -0,0 +1 @@
../../SDWebImage/SDWebImage/SDWebImageOperation.h

View File

@@ -0,0 +1 @@
../../SDWebImage/SDWebImage/SDWebImagePrefetcher.h

View File

@@ -0,0 +1 @@
../../SDWebImage/SDWebImage/UIButton+WebCache.h

View File

@@ -0,0 +1 @@
../../SDWebImage/SDWebImage/UIImageView+WebCache.h

View File

@@ -0,0 +1,27 @@
# Acknowledgements
This application makes use of the following third party libraries:
## SDWebImage
Copyright (c) 2009 Olivier Poitrey <rs@dailymotion.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Generated by CocoaPods - http://cocoapods.org

View File

@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>FooterText</key>
<string>This application makes use of the following third party libraries:</string>
<key>Title</key>
<string>Acknowledgements</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Copyright (c) 2009 Olivier Poitrey &lt;rs@dailymotion.com&gt;
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
</string>
<key>Title</key>
<string>SDWebImage</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Generated by CocoaPods - http://cocoapods.org</string>
<key>Title</key>
<string></string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
</array>
<key>StringsTable</key>
<string>Acknowledgements</string>
<key>Title</key>
<string>Acknowledgements</string>
</dict>
</plist>

View File

@@ -0,0 +1,3 @@
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#endif

View File

@@ -0,0 +1,27 @@
#!/bin/sh
install_resource()
{
case $1 in
*.storyboard)
echo "ibtool --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}"
ibtool --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}"
;;
*.xib)
echo "ibtool --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}"
ibtool --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}"
;;
*.framework)
echo "rsync -rp ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
rsync -rp "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
;;
*.xcdatamodeld)
echo "xcrun momc ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .xcdatamodeld`.momd"
xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename $1 .xcdatamodeld`.momd"
;;
*)
echo "cp -R ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
cp -R "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
;;
esac
}

View File

@@ -0,0 +1,7 @@
ALWAYS_SEARCH_USER_PATHS = YES
HEADER_SEARCH_PATHS = ${PODS_HEADERS_SEARCH_PATHS}
OTHER_LDFLAGS = -ObjC -framework ImageIO -framework MapKit
PODS_BUILD_HEADERS_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/SDWebImage"
PODS_HEADERS_SEARCH_PATHS = ${PODS_PUBLIC_HEADERS_SEARCH_PATHS}
PODS_PUBLIC_HEADERS_SEARCH_PATHS = "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/SDWebImage"
PODS_ROOT = ${SRCROOT}/Pods

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,4 @@
@interface PodsDummy_Pods : NSObject
@end
@implementation PodsDummy_Pods
@end

View File

@@ -0,0 +1,20 @@
Copyright (c) 2009 Olivier Poitrey <rs@dailymotion.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -0,0 +1,239 @@
Web Image
=========
This library provides a category for UIImageVIew with support for remote images coming from the web.
It provides:
- An UIImageView category adding web image and cache management to the Cocoa Touch framework
- An asynchronous image downloader
- An asynchronous memory + disk image caching with automatic cache expiration handling
- A background image decompression
- A guarantee that the same URL won't be downloaded several times
- A guarantee that bogus URLs won't be retried again and again
- A guarantee that main thread will never be blocked
- Performances!
- Use GCD and ARC
NOTE: The version 3.0 of SDWebImage isn't fully backward compatible with 2.0 and requires iOS 5.0
minimum deployement version. If you need iOS < 5.0 support, please use the last [2.0 version](https://github.com/rs/SDWebImage/tree/2.0-compat).
[How is SDWebImage better than X?](https://github.com/rs/SDWebImage/wiki/How-is-SDWebImage-better-than-X%3F)
Who Use It
----------
Find out [who use SDWebImage](https://github.com/rs/SDWebImage/wiki/Who-Use-SDWebImage) and add your app to the list.
How To Use
----------
API documentation is available at [http://hackemist.com/SDWebImage/doc/](http://hackemist.com/SDWebImage/doc/)
### Using UIImageView+WebCache category with UITableView
Just #import the UIImageView+WebCache.h header, and call the setImageWithURL:placeholderImage:
method from the tableView:cellForRowAtIndexPath: UITableViewDataSource method. Everything will be
handled for you, from async downloads to caching management.
```objective-c
#import <SDWebImage/UIImageView+WebCache.h>
...
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *MyIdentifier = @"MyIdentifier";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier];
if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
reuseIdentifier:MyIdentifier] autorelease];
}
// Here we use the new provided setImageWithURL: method to load the web image
[cell.imageView setImageWithURL:[NSURL URLWithString:@"http://www.domain.com/path/to/image.jpg"]
placeholderImage:[UIImage imageNamed:@"placeholder.png"]];
cell.textLabel.text = @"My Text";
return cell;
}
```
### Using blocks
With blocks, you can be notified about the image download progress and whenever the image retrival
has completed with success or not:
```objective-c
// Here we use the new provided setImageWithURL: method to load the web image
[cell.imageView setImageWithURL:[NSURL URLWithString:@"http://www.domain.com/path/to/image.jpg"]
placeholderImage:[UIImage imageNamed:@"placeholder.png"]
completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType) {... completion code here ...}];
```
Note: neither your success nor failure block will be call if your image request is canceled before completion.
### Using SDWebImageManager
The SDWebImageManager is the class behind the UIImageView+WebCache category. It ties the
asynchronous downloader with the image cache store. You can use this class directly to benefit
from web image downloading with caching in another context than a UIView (ie: with Cocoa).
Here is a simple example of how to use SDWebImageManager:
```objective-c
SDWebImageManager *manager = [SDWebImageManager sharedManager];
[manager downloadWithURL:imageURL
options:0
progress:^(NSUInteger receivedSize, long long expectedSize)
{
// progression tracking code
}
completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType)
{
if (image)
{
// do something with image
}
}];
```
### Using Asynchronous Image Downloader Independently
It's also possible to use the async image downloader independently:
```objective-c
[SDWebImageDownloader.sharedDownloader downloadImageWithURL:imageURL
options:0
progress:^(NSUInteger receivedSize, long long expectedSize)
{
// progression tracking code
}
completed:^(UIImage *image, NSError *error, BOOL finished)
{
if (image && finished)
{
// do something with image
}
}];
```
### Using Asynchronous Image Caching Independently
It is also possible to use the aync based image cache store independently. SDImageCache
maintains a memory cache and an optional disk cache. Disk cache write operations are performed
asynchronous so it doesn't add unnecessary latency to the UI.
The SDImageCache class provides a singleton instance for convenience but you can create your own
instance if you want to create separated cache namespace.
To lookup the cache, you use the imageForKey: method. If the method returns nil, it means the cache
doesn't currently own the image. You are thus responsible for generating and caching it. The cache
key is an application unique identifier for the image to cache. It is generally the absolute URL of
the image.
```objective-c
SDImageCache *imageCache = [SDImageCache.alloc initWithNamespace:@"myNamespace"];
[imageCache queryDiskCacheForKey:myCacheKey done:^(UIImage *image)
{
// image is not nil if image was found
}];
```
By default SDImageCache will lookup the disk cache if an image can't be found in the memory cache.
You can prevent this from happening by calling the alternative method `imageFromMemoryCacheForKey:`.
To store an image into the cache, you use the storeImage:forKey: method:
```objective-c
[[SDImageCache sharedImageCache] storeImage:myImage forKey:myCacheKey];
```
By default, the image will be stored in memory cache as well as on disk cache (asynchronously). If
you want only the memory cache, use the alternative method storeImage:forKey:toDisk: with a negative
third argument.
### Using cache key filter
Sometime, you may not want to use the image URL as cache key because part of the URL is dynamic
(i.e.: for access control purpose). SDWebImageManager provides a way to set a cache key filter that
takes the NSURL as input, and output a cache key NSString.
The following example sets a filter in the application delegate that will remove any query-string from
the URL before to use it as a cache key:
```objective-c
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
SDWebImageManager.sharedManager.cacheKeyFilter:^(NSURL *url)
{
url = [[[NSURL alloc] initWithScheme:url.scheme host:url.host path:url.path] autorelease];
return [url absoluteString];
};
// Your app init code...
return YES;
}
```
Common Problems
---------------
### Using dynamic image size with UITableViewCell
UITableView determins the size of the image by the first image set for a cell. If your remote images
don't have the same size as your placeholder image, you may experience strange anamorphic scaling issue.
The following article gives a way to workaround this issue:
[http://www.wrichards.com/blog/2011/11/sdwebimage-fixed-width-cell-images/](http://www.wrichards.com/blog/2011/11/sdwebimage-fixed-width-cell-images/)
Installation
------------
There are two ways to use this in your project: copy all the files into your project, or import the project as a static library.
### Add the SDWebImage project to your project
- Download and unzip the last version of the framework from the [download page](https://github.com/rs/SDWebImage/wiki/Download-Complied-Framework)
- Right-click on the project navigator and select "Add Files to "Your Project":
- In the dialog, select SDWebImage.framework:
- Check the "Copy items into destination group's folder (if needed)" checkbox
### Add dependencies
- In you application project apps target settings, find the "Build Phases" section and open the "Link Binary With Libraries" block:
- Click the "+" button again and select the "ImageIO.framework", this is needed by the progressive download feature:
### Add Linker Flag
Open the "Build Settings" tab, in the "Linking" section, locate the "Other Linker Flags" setting and add the "-ObjC" flag:
![Other Linker Flags](http://dl.dropbox.com/u/123346/SDWebImage/10_other_linker_flags.jpg)
### Import headers in your source files
In the source files where you need to use the library, import the header file:
```objective-c
#import <SDWebImage/UIImageView+WebCache.h>
```
### Build Project
At this point your workspace should build without error. If you are having problem, post to the Issue and the
community can help you solve it.
Future Enhancements
-------------------
- LRU memory cache cleanup instead of reset on memory warning
## Licenses
All source code is licensed under the [MIT License](https://raw.github.com/rs/SDWebImage/master/LICENSE).

View File

@@ -0,0 +1,28 @@
Pod::Spec.new do |s|
s.name = 'SDWebImage'
s.version = '3.2'
s.platform = :ios, '5.0'
s.license = 'MIT'
s.summary = 'Asynchronous image downloader with cache support with an UIImageView category.'
s.homepage = 'https://github.com/rs/SDWebImage'
s.author = { 'Olivier Poitrey' => 'rs@dailymotion.com' }
s.source = { :git => 'https://github.com/rs/SDWebImage.git', :tag => '3.2' }
s.description = 'This library provides a category for UIImageVIew with support for remote ' \
'images coming from the web. It provides an UIImageView category adding web ' \
'image and cache management to the Cocoa Touch framework, an asynchronous ' \
'image downloader, an asynchronous memory + disk image caching with automatic ' \
'cache expiration handling, a guarantee that the same URL won\'t be downloaded ' \
'several times, a guarantee that bogus URLs won\'t be retried again and again, ' \
'and performances!'
s.requires_arc = true
s.source_files = 'SDWebImage/{SD,UI}*.{h,m}'
s.framework = 'ImageIO'
# TODO currently CocoaPods always tries to install the subspec even if the dependency is on just 'SDWebImage'
s.subspec 'MapKit' do |mk|
mk.source_files = 'SDWebImage/MKAnnotationView+WebCache.*'
mk.framework = 'MapKit'
end
end

View File

@@ -0,0 +1,95 @@
//
// MKAnnotationView+WebCache.h
// SDWebImage
//
// Created by Olivier Poitrey on 14/03/12.
// Copyright (c) 2012 Dailymotion. All rights reserved.
//
#import "MapKit/MapKit.h"
#import "SDWebImageManager.h"
/**
* Integrates SDWebImage async downloading and caching of remote images with MKAnnotationView.
*/
@interface MKAnnotationView (WebCache)
/**
* Set the imageView `image` with an `url`.
*
* The downloand is asynchronous and cached.
*
* @param url The url for the image.
*/
- (void)setImageWithURL:(NSURL *)url;
/**
* Set the imageView `image` with an `url` and a placeholder.
*
* The downloand is asynchronous and cached.
*
* @param url The url for the image.
* @param placeholder The image to be set initially, until the image request finishes.
* @see setImageWithURL:placeholderImage:options:
*/
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder;
/**
* Set the imageView `image` with an `url`, placeholder and custom options.
*
* The downloand is asynchronous and cached.
*
* @param url The url for the image.
* @param placeholder The image to be set initially, until the image request finishes.
* @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values.
*/
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options;
/**
* Set the imageView `image` with an `url`.
*
* The downloand is asynchronous and cached.
*
* @param url The url for the image.
* @param completedBlock A block called when operation has been completed. This block as no return value
* and takes the requested UIImage as first parameter. In case of error the image parameter
* is nil and the second parameter may contain an NSError. The third parameter is a Boolean
* indicating if the image was retrived from the local cache of from the network.
*/
- (void)setImageWithURL:(NSURL *)url completed:(SDWebImageCompletedBlock)completedBlock;
/**
* Set the imageView `image` with an `url`, placeholder.
*
* The downloand is asynchronous and cached.
*
* @param url The url for the image.
* @param placeholder The image to be set initially, until the image request finishes.
* @param completedBlock A block called when operation has been completed. This block as no return value
* and takes the requested UIImage as first parameter. In case of error the image parameter
* is nil and the second parameter may contain an NSError. The third parameter is a Boolean
* indicating if the image was retrived from the local cache of from the network.
*/
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock;
/**
* Set the imageView `image` with an `url`, placeholder and custom options.
*
* The downloand is asynchronous and cached.
*
* @param url The url for the image.
* @param placeholder The image to be set initially, until the image request finishes.
* @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values.
* @param completedBlock A block called when operation has been completed. This block as no return value
* and takes the requested UIImage as first parameter. In case of error the image parameter
* is nil and the second parameter may contain an NSError. The third parameter is a Boolean
* indicating if the image was retrived from the local cache of from the network.
*/
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock;
/**
* Cancel the current download
*/
- (void)cancelCurrentImageLoad;
@end

View File

@@ -0,0 +1,78 @@
//
// MKAnnotationView+WebCache.m
// SDWebImage
//
// Created by Olivier Poitrey on 14/03/12.
// Copyright (c) 2012 Dailymotion. All rights reserved.
//
#import "MKAnnotationView+WebCache.h"
#import "objc/runtime.h"
static char operationKey;
@implementation MKAnnotationView (WebCache)
- (void)setImageWithURL:(NSURL *)url
{
[self setImageWithURL:url placeholderImage:nil options:0 completed:nil];
}
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder
{
[self setImageWithURL:url placeholderImage:placeholder options:0 completed:nil];
}
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options
{
[self setImageWithURL:url placeholderImage:placeholder options:options completed:nil];
}
- (void)setImageWithURL:(NSURL *)url completed:(SDWebImageCompletedBlock)completedBlock
{
[self setImageWithURL:url placeholderImage:nil options:0 completed:completedBlock];
}
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock
{
[self setImageWithURL:url placeholderImage:placeholder options:0 completed:completedBlock];
}
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock
{
[self cancelCurrentImageLoad];
self.image = placeholder;
if (url)
{
__weak MKAnnotationView *wself = self;
id<SDWebImageOperation> operation = [SDWebImageManager.sharedManager downloadWithURL:url options:options progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished)
{
__strong MKAnnotationView *sself = wself;
if (!sself) return;
if (image)
{
sself.image = image;
}
if (completedBlock && finished)
{
completedBlock(image, error, cacheType);
}
}];
objc_setAssociatedObject(self, &operationKey, operation, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
}
- (void)cancelCurrentImageLoad
{
// Cancel in progress downloader from queue
id<SDWebImageOperation> operation = objc_getAssociatedObject(self, &operationKey);
if (operation)
{
[operation cancel];
objc_setAssociatedObject(self, &operationKey, nil, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
}
@end

View File

@@ -0,0 +1,144 @@
/*
* This file is part of the SDWebImage package.
* (c) Olivier Poitrey <rs@dailymotion.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
#import <Foundation/Foundation.h>
#import "SDWebImageCompat.h"
enum SDImageCacheType
{
/**
* The image wasn't available the SDWebImage caches, but was downloaded from the web.
*/
SDImageCacheTypeNone = 0,
/**
* The image was obtained from the disk cache.
*/
SDImageCacheTypeDisk,
/**
* The image was obtained from the disk cache.
*/
SDImageCacheTypeMemory
};
typedef enum SDImageCacheType SDImageCacheType;
/**
* SDImageCache maintains a memory cache and an optional disk cache. Disk cache write operations are performed
* asynchronous so it doesnt add unnecessary latency to the UI.
*/
@interface SDImageCache : NSObject
/**
* The maximum length of time to keep an image in the cache, in seconds
*/
@property (assign, nonatomic) NSInteger maxCacheAge;
/**
* Returns global shared cache instance
*
* @return SDImageCache global instance
*/
+ (SDImageCache *)sharedImageCache;
/**
* Init a new cache store with a specific namespace
*
* @param ns The namespace to use for this cache store
*/
- (id)initWithNamespace:(NSString *)ns;
/**
* Store an image into memory and disk cache at the given key.
*
* @param image The image to store
* @param key The unique image cache key, usually it's image absolute URL
*/
- (void)storeImage:(UIImage *)image forKey:(NSString *)key;
/**
* Store an image into memory and optionally disk cache at the given key.
*
* @param image The image to store
* @param key The unique image cache key, usually it's image absolute URL
* @param toDisk Store the image to disk cache if YES
*/
- (void)storeImage:(UIImage *)image forKey:(NSString *)key toDisk:(BOOL)toDisk;
/**
* Store an image into memory and optionally disk cache at the given key.
*
* @param image The image to store
* @param data The image data as returned by the server, this representation will be used for disk storage
* instead of converting the given image object into a storable/compressed image format in order
* to save quality and CPU
* @param key The unique image cache key, usually it's image absolute URL
* @param toDisk Store the image to disk cache if YES
*/
- (void)storeImage:(UIImage *)image imageData:(NSData *)data forKey:(NSString *)key toDisk:(BOOL)toDisk;
/**
* Query the disk cache asynchronousely.
*
* @param key The unique key used to store the wanted image
*/
- (void)queryDiskCacheForKey:(NSString *)key done:(void (^)(UIImage *image, SDImageCacheType cacheType))doneBlock;
/**
* Query the memory cache.
*
* @param key The unique key used to store the wanted image
*/
- (UIImage *)imageFromMemoryCacheForKey:(NSString *)key;
/**
* Query the disk cache synchronousely.
*
* @param key The unique key used to store the wanted image
*/
- (UIImage *)imageFromDiskCacheForKey:(NSString *)key;
/**
* Remove the image from memory and disk cache synchronousely
*
* @param key The unique image cache key
*/
- (void)removeImageForKey:(NSString *)key;
/**
* Remove the image from memory and optionaly disk cache synchronousely
*
* @param key The unique image cache key
* @param fromDisk Also remove cache entry from disk if YES
*/
- (void)removeImageForKey:(NSString *)key fromDisk:(BOOL)fromDisk;
/**
* Clear all memory cached images
*/
- (void)clearMemory;
/**
* Clear all disk cached images
*/
- (void)clearDisk;
/**
* Remove all expired cached image from disk
*/
- (void)cleanDisk;
/**
* Get the size used by the disk cache
*/
- (int)getSize;
/**
* Get the number of images in the disk cache
*/
- (int)getDiskCount;
@end

View File

@@ -0,0 +1,312 @@
/*
* This file is part of the SDWebImage package.
* (c) Olivier Poitrey <rs@dailymotion.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
#import "SDImageCache.h"
#import "SDWebImageDecoder.h"
#import <CommonCrypto/CommonDigest.h>
#import "SDWebImageDecoder.h"
#import <mach/mach.h>
#import <mach/mach_host.h>
static const NSInteger kDefaultCacheMaxCacheAge = 60 * 60 * 24 * 7; // 1 week
@interface SDImageCache ()
@property (strong, nonatomic) NSCache *memCache;
@property (strong, nonatomic) NSString *diskCachePath;
@property (SDDispatchQueueSetterSementics, nonatomic) dispatch_queue_t ioQueue;
@end
@implementation SDImageCache
+ (SDImageCache *)sharedImageCache
{
static dispatch_once_t once;
static id instance;
dispatch_once(&once, ^{instance = self.new;});
return instance;
}
- (id)init
{
return [self initWithNamespace:@"default"];
}
- (id)initWithNamespace:(NSString *)ns
{
if ((self = [super init]))
{
NSString *fullNamespace = [@"com.hackemist.SDWebImageCache." stringByAppendingString:ns];
// Create IO serial queue
_ioQueue = dispatch_queue_create("com.hackemist.SDWebImageCache", DISPATCH_QUEUE_SERIAL);
// Init default values
_maxCacheAge = kDefaultCacheMaxCacheAge;
// Init the memory cache
_memCache = [[NSCache alloc] init];
_memCache.name = fullNamespace;
// Init the disk cache
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
_diskCachePath = [paths[0] stringByAppendingPathComponent:fullNamespace];
#if TARGET_OS_IPHONE
// Subscribe to app events
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(clearMemory)
name:UIApplicationDidReceiveMemoryWarningNotification
object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(cleanDisk)
name:UIApplicationWillTerminateNotification
object:nil];
#endif
}
return self;
}
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
SDDispatchQueueRelease(_ioQueue);
}
#pragma mark SDImageCache (private)
- (NSString *)cachePathForKey:(NSString *)key
{
const char *str = [key UTF8String];
unsigned char r[CC_MD5_DIGEST_LENGTH];
CC_MD5(str, (CC_LONG)strlen(str), r);
NSString *filename = [NSString stringWithFormat:@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8], r[9], r[10], r[11], r[12], r[13], r[14], r[15]];
return [self.diskCachePath stringByAppendingPathComponent:filename];
}
#pragma mark ImageCache
- (void)storeImage:(UIImage *)image imageData:(NSData *)imageData forKey:(NSString *)key toDisk:(BOOL)toDisk
{
if (!image || !key)
{
return;
}
[self.memCache setObject:image forKey:key cost:image.size.height * image.size.width * image.scale];
if (toDisk)
{
dispatch_async(self.ioQueue, ^
{
NSData *data = imageData;
if (!data)
{
if (image)
{
#if TARGET_OS_IPHONE
data = UIImageJPEGRepresentation(image, (CGFloat)1.0);
#else
data = [NSBitmapImageRep representationOfImageRepsInArray:image.representations usingType: NSJPEGFileType properties:nil];
#endif
}
}
if (data)
{
// Can't use defaultManager another thread
NSFileManager *fileManager = NSFileManager.new;
if (![fileManager fileExistsAtPath:_diskCachePath])
{
[fileManager createDirectoryAtPath:_diskCachePath withIntermediateDirectories:YES attributes:nil error:NULL];
}
[fileManager createFileAtPath:[self cachePathForKey:key] contents:data attributes:nil];
}
});
}
}
- (void)storeImage:(UIImage *)image forKey:(NSString *)key
{
[self storeImage:image imageData:nil forKey:key toDisk:YES];
}
- (void)storeImage:(UIImage *)image forKey:(NSString *)key toDisk:(BOOL)toDisk
{
[self storeImage:image imageData:nil forKey:key toDisk:toDisk];
}
- (UIImage *)imageFromMemoryCacheForKey:(NSString *)key
{
return [self.memCache objectForKey:key];
}
- (UIImage *)imageFromDiskCacheForKey:(NSString *)key
{
// First check the in-memory cache...
UIImage *image = [self imageFromMemoryCacheForKey:key];
if (image)
{
return image;
}
// Second check the disk cache...
UIImage *diskImage = [UIImage decodedImageWithImage:SDScaledImageForPath(key, [NSData dataWithContentsOfFile:[self cachePathForKey:key]])];
if (diskImage)
{
CGFloat cost = diskImage.size.height * diskImage.size.width * diskImage.scale;
[self.memCache setObject:diskImage forKey:key cost:cost];
}
return diskImage;
}
- (void)queryDiskCacheForKey:(NSString *)key done:(void (^)(UIImage *image, SDImageCacheType cacheType))doneBlock
{
if (!doneBlock) return;
if (!key)
{
doneBlock(nil, SDImageCacheTypeNone);
return;
}
// First check the in-memory cache...
UIImage *image = [self imageFromMemoryCacheForKey:key];
if (image)
{
doneBlock(image, SDImageCacheTypeMemory);
return;
}
dispatch_async(self.ioQueue, ^
{
UIImage *diskImage = [UIImage decodedImageWithImage:SDScaledImageForPath(key, [NSData dataWithContentsOfFile:[self cachePathForKey:key]])];
if (diskImage)
{
CGFloat cost = diskImage.size.height * diskImage.size.width * diskImage.scale;
[self.memCache setObject:diskImage forKey:key cost:cost];
}
dispatch_async(dispatch_get_main_queue(), ^
{
doneBlock(diskImage, SDImageCacheTypeDisk);
});
});
}
- (void)removeImageForKey:(NSString *)key
{
[self removeImageForKey:key fromDisk:YES];
}
- (void)removeImageForKey:(NSString *)key fromDisk:(BOOL)fromDisk
{
if (key == nil)
{
return;
}
[self.memCache removeObjectForKey:key];
if (fromDisk)
{
dispatch_async(self.ioQueue, ^
{
[[NSFileManager defaultManager] removeItemAtPath:[self cachePathForKey:key] error:nil];
});
}
}
- (void)clearMemory
{
[self.memCache removeAllObjects];
}
- (void)clearDisk
{
dispatch_async(self.ioQueue, ^
{
[[NSFileManager defaultManager] removeItemAtPath:self.diskCachePath error:nil];
[[NSFileManager defaultManager] createDirectoryAtPath:self.diskCachePath
withIntermediateDirectories:YES
attributes:nil
error:NULL];
});
}
- (void)cleanDisk
{
dispatch_async(self.ioQueue, ^
{
NSDate *expirationDate = [NSDate dateWithTimeIntervalSinceNow:-self.maxCacheAge];
// convert NSString path to NSURL path
NSURL *diskCacheURL = [NSURL fileURLWithPath:self.diskCachePath isDirectory:YES];
// build an enumerator by also prefetching file properties we want to read
NSDirectoryEnumerator *fileEnumerator = [[NSFileManager defaultManager] enumeratorAtURL:diskCacheURL
includingPropertiesForKeys:@[ NSURLIsDirectoryKey, NSURLContentModificationDateKey ]
options:NSDirectoryEnumerationSkipsHiddenFiles
errorHandler:NULL];
for (NSURL *fileURL in fileEnumerator)
{
// skip folder
NSNumber *isDirectory;
[fileURL getResourceValue:&isDirectory forKey:NSURLIsDirectoryKey error:NULL];
if ([isDirectory boolValue])
{
continue;
}
// compare file date with the max age
NSDate *fileModificationDate;
[fileURL getResourceValue:&fileModificationDate forKey:NSURLContentModificationDateKey error:NULL];
if ([[fileModificationDate laterDate:expirationDate] isEqualToDate:expirationDate])
{
[[NSFileManager defaultManager] removeItemAtURL:fileURL error:nil];
}
}
});
}
-(int)getSize
{
int size = 0;
NSDirectoryEnumerator *fileEnumerator = [[NSFileManager defaultManager] enumeratorAtPath:self.diskCachePath];
for (NSString *fileName in fileEnumerator)
{
NSString *filePath = [self.diskCachePath stringByAppendingPathComponent:fileName];
NSDictionary *attrs = [[NSFileManager defaultManager] attributesOfItemAtPath:filePath error:nil];
size += [attrs fileSize];
}
return size;
}
- (int)getDiskCount
{
int count = 0;
NSDirectoryEnumerator *fileEnumerator = [[NSFileManager defaultManager] enumeratorAtPath:self.diskCachePath];
for (NSString *fileName in fileEnumerator)
{
count += 1;
}
return count;
}
@end

View File

@@ -0,0 +1,56 @@
/*
* This file is part of the SDWebImage package.
* (c) Olivier Poitrey <rs@dailymotion.com>
* (c) Jamie Pinkham
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
#import <TargetConditionals.h>
#ifdef __OBJC_GC__
#error SDWebImage does not support Objective-C Garbage Collection
#endif
#if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_5_0
#error SDWebImage doesn't support Deployement Target version < 5.0
#endif
#if !TARGET_OS_IPHONE
#import <AppKit/AppKit.h>
#ifndef UIImage
#define UIImage NSImage
#endif
#ifndef UIImageView
#define UIImageView NSImageView
#endif
#else
#import <UIKit/UIKit.h>
#endif
// @see https://github.com/ccgus/fmdb/commit/aef763eeb64e6fa654e7d121f1df4c16a98d9f4f
#define SDDispatchQueueRelease(q) (dispatch_release(q))
#if TARGET_OS_IPHONE
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000
#undef SDDispatchQueueRelease
#define SDDispatchQueueRelease(q)
#undef SDDispatchQueueSetterSementics
#define SDDispatchQueueSetterSementics strong
#endif
#else
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
#undef SDDispatchQueueRelease
#define SDDispatchQueueRelease(q)
#undef SDDispatchQueueSetterSementics
#define SDDispatchQueueSetterSementics strong
#endif
#endif
#if OS_OBJECT_USE_OBJC
#define SDDispatchQueueSetterSementics strong
#else
#define SDDispatchQueueSetterSementics assign
#endif
extern UIImage *SDScaledImageForPath(NSString *path, NSObject *imageOrData);

View File

@@ -0,0 +1,54 @@
//
// SDWebImageCompat.m
// SDWebImage
//
// Created by Olivier Poitrey on 11/12/12.
// Copyright (c) 2012 Dailymotion. All rights reserved.
//
#import "SDWebImageCompat.h"
#if !__has_feature(objc_arc)
#error SDWebImage is ARC only. Either turn on ARC for the project or use -fobjc-arc flag
#endif
UIImage *SDScaledImageForPath(NSString *path, NSObject *imageOrData)
{
if (!imageOrData)
{
return nil;
}
UIImage *image = nil;
if ([imageOrData isKindOfClass:[NSData class]])
{
image = [[UIImage alloc] initWithData:(NSData *)imageOrData];
}
else if ([imageOrData isKindOfClass:[UIImage class]])
{
image = (UIImage *)imageOrData;
}
else
{
return nil;
}
if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)])
{
CGFloat scale = 1.0;
if (path.length >= 8)
{
// Search @2x. at the end of the string, before a 3 to 4 extension length (only if key len is 8 or more @2x. + 4 len ext)
NSRange range = [path rangeOfString:@"@2x." options:0 range:NSMakeRange(path.length - 8, 5)];
if (range.location != NSNotFound)
{
scale = 2.0;
}
}
UIImage *scaledImage = [[UIImage alloc] initWithCGImage:image.CGImage scale:scale orientation:image.imageOrientation];
image = scaledImage;
}
return image;
}

View File

@@ -0,0 +1,18 @@
/*
* This file is part of the SDWebImage package.
* (c) Olivier Poitrey <rs@dailymotion.com>
*
* Created by james <https://github.com/mystcolor> on 9/28/11.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
#import <Foundation/Foundation.h>
#import "SDWebImageCompat.h"
@interface UIImage (ForceDecode)
+ (UIImage *)decodedImageWithImage:(UIImage *)image;
@end

View File

@@ -0,0 +1,70 @@
/*
* This file is part of the SDWebImage package.
* (c) Olivier Poitrey <rs@dailymotion.com>
*
* Created by james <https://github.com/mystcolor> on 9/28/11.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
#import "SDWebImageDecoder.h"
@implementation UIImage (ForceDecode)
+ (UIImage *)decodedImageWithImage:(UIImage *)image
{
CGImageRef imageRef = image.CGImage;
CGSize imageSize = CGSizeMake(CGImageGetWidth(imageRef), CGImageGetHeight(imageRef));
CGRect imageRect = (CGRect){.origin = CGPointZero, .size = imageSize};
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
CGBitmapInfo bitmapInfo = CGImageGetBitmapInfo(imageRef);
int infoMask = (bitmapInfo & kCGBitmapAlphaInfoMask);
BOOL anyNonAlpha = (infoMask == kCGImageAlphaNone ||
infoMask == kCGImageAlphaNoneSkipFirst ||
infoMask == kCGImageAlphaNoneSkipLast);
// CGBitmapContextCreate doesn't support kCGImageAlphaNone with RGB.
// https://developer.apple.com/library/mac/#qa/qa1037/_index.html
if (infoMask == kCGImageAlphaNone && CGColorSpaceGetNumberOfComponents(colorSpace) > 1)
{
// Unset the old alpha info.
bitmapInfo &= ~kCGBitmapAlphaInfoMask;
// Set noneSkipFirst.
bitmapInfo |= kCGImageAlphaNoneSkipFirst;
}
// Some PNGs tell us they have alpha but only 3 components. Odd.
else if (!anyNonAlpha && CGColorSpaceGetNumberOfComponents(colorSpace) == 3)
{
// Unset the old alpha info.
bitmapInfo &= ~kCGBitmapAlphaInfoMask;
bitmapInfo |= kCGImageAlphaPremultipliedFirst;
}
// It calculates the bytes-per-row based on the bitsPerComponent and width arguments.
CGContextRef context = CGBitmapContextCreate(NULL,
imageSize.width,
imageSize.height,
CGImageGetBitsPerComponent(imageRef),
0,
colorSpace,
bitmapInfo);
CGColorSpaceRelease(colorSpace);
// If failed, return undecompressed image
if (!context) return image;
CGContextDrawImage(context, imageRect, imageRef);
CGImageRef decompressedImageRef = CGBitmapContextCreateImage(context);
CGContextRelease(context);
UIImage *decompressedImage = [UIImage imageWithCGImage:decompressedImageRef scale:image.scale orientation:image.imageOrientation];
CGImageRelease(decompressedImageRef);
return decompressedImage;
}
@end

Some files were not shown because too many files have changed in this diff Show More