Update docs

This commit is contained in:
Reda Lemeden 2017-12-31 20:08:19 +01:00
parent 693dbc9eb4
commit c8fede3e86
24 changed files with 598 additions and 322 deletions

View File

@ -65,9 +65,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:C4Gifu12GIFImageView"></a> <a name="/c:@M@Gifu@objc(cs)GIFImageView"></a>
<a name="//apple_ref/swift/Class/GIFImageView" class="dashAnchor"></a> <a name="//apple_ref/swift/Class/GIFImageView" class="dashAnchor"></a>
<a class="token" href="#/s:C4Gifu12GIFImageView">GIFImageView</a> <a class="token" href="#/c:@M@Gifu@objc(cs)GIFImageView">GIFImageView</a>
</code> </code>
</div> </div>
<div class="height-container"> <div class="height-container">
@ -97,9 +97,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:C4Gifu8Animator"></a> <a name="/s:4Gifu8AnimatorC"></a>
<a name="//apple_ref/swift/Class/Animator" class="dashAnchor"></a> <a name="//apple_ref/swift/Class/Animator" class="dashAnchor"></a>
<a class="token" href="#/s:C4Gifu8Animator">Animator</a> <a class="token" href="#/s:4Gifu8AnimatorC">Animator</a>
</code> </code>
</div> </div>
<div class="height-container"> <div class="height-container">
@ -128,7 +128,7 @@
</section> </section>
<section id="footer"> <section id="footer">
<p>2015 © Reda Lemeden. See LICENSE for more details.</p> <p>2015 © Reda Lemeden. See LICENSE for more details.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p> <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section> </section>
</article> </article>
</div> </div>

View File

@ -72,9 +72,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:FC4Gifu8AnimatorcFT12withDelegatePS_13GIFAnimatable__S0_"></a> <a name="/s:4Gifu8AnimatorCAcA13GIFAnimatable_p12withDelegate_tcfc"></a>
<a name="//apple_ref/swift/Method/init(withDelegate:)" class="dashAnchor"></a> <a name="//apple_ref/swift/Method/init(withDelegate:)" class="dashAnchor"></a>
<a class="token" href="#/s:FC4Gifu8AnimatorcFT12withDelegatePS_13GIFAnimatable__S0_">init(withDelegate:)</a> <a class="token" href="#/s:4Gifu8AnimatorCAcA13GIFAnimatable_p12withDelegate_tcfc">init(withDelegate:)</a>
</code> </code>
</div> </div>
<div class="height-container"> <div class="height-container">
@ -105,8 +105,7 @@
</td> </td>
<td> <td>
<div> <div>
<p>A view object that implements the <code>GIFAnimatable</code> protocol.</p> <p>A view object that implements the <code><a href="../Protocols/GIFAnimatable.html">GIFAnimatable</a></code> protocol.</p>
</div> </div>
</td> </td>
</tr> </tr>
@ -116,7 +115,6 @@
<div> <div>
<h4>Return Value</h4> <h4>Return Value</h4>
<p>A new animator instance.</p> <p>A new animator instance.</p>
</div> </div>
</section> </section>
</div> </div>
@ -127,7 +125,7 @@
</section> </section>
<section id="footer"> <section id="footer">
<p>2015 © Reda Lemeden. See LICENSE for more details.</p> <p>2015 © Reda Lemeden. See LICENSE for more details.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p> <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section> </section>
</article> </article>
</div> </div>

View File

@ -72,9 +72,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:vC4Gifu12GIFImageView8animatorGSqCS_8Animator_"></a> <a name="/s:4Gifu12GIFImageViewC8animatorAA8AnimatorCSgv"></a>
<a name="//apple_ref/swift/Property/animator" class="dashAnchor"></a> <a name="//apple_ref/swift/Property/animator" class="dashAnchor"></a>
<a class="token" href="#/s:vC4Gifu12GIFImageView8animatorGSqCS_8Animator_">animator</a> <a class="token" href="#/s:4Gifu12GIFImageViewC8animatorAA8AnimatorCSgv">animator</a>
</code> </code>
</div> </div>
<div class="height-container"> <div class="height-container">
@ -99,9 +99,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:FC4Gifu12GIFImageView7displayFCSo7CALayerT_"></a> <a name="/c:@M@Gifu@objc(cs)GIFImageView(im)displayLayer:"></a>
<a name="//apple_ref/swift/Method/display(_:)" class="dashAnchor"></a> <a name="//apple_ref/swift/Method/display(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:FC4Gifu12GIFImageView7displayFCSo7CALayerT_">display(_:)</a> <a class="token" href="#/c:@M@Gifu@objc(cs)GIFImageView(im)displayLayer:">display(_:)</a>
</code> </code>
</div> </div>
<div class="height-container"> <div class="height-container">
@ -133,7 +133,6 @@
<td> <td>
<div> <div>
<p>The delegated layer.</p> <p>The delegated layer.</p>
</div> </div>
</td> </td>
</tr> </tr>
@ -149,7 +148,7 @@
</section> </section>
<section id="footer"> <section id="footer">
<p>2015 © Reda Lemeden. See LICENSE for more details.</p> <p>2015 © Reda Lemeden. See LICENSE for more details.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p> <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section> </section>
</article> </article>
</div> </div>

View File

@ -65,9 +65,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:P4Gifu13GIFAnimatable"></a> <a name="/s:4Gifu13GIFAnimatableP"></a>
<a name="//apple_ref/swift/Protocol/GIFAnimatable" class="dashAnchor"></a> <a name="//apple_ref/swift/Protocol/GIFAnimatable" class="dashAnchor"></a>
<a class="token" href="#/s:P4Gifu13GIFAnimatable">GIFAnimatable</a> <a class="token" href="#/s:4Gifu13GIFAnimatableP">GIFAnimatable</a>
</code> </code>
</div> </div>
<div class="height-container"> <div class="height-container">
@ -93,9 +93,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:P4Gifu14ImageContainer"></a> <a name="/s:4Gifu14ImageContainerP"></a>
<a name="//apple_ref/swift/Protocol/ImageContainer" class="dashAnchor"></a> <a name="//apple_ref/swift/Protocol/ImageContainer" class="dashAnchor"></a>
<a class="token" href="#/s:P4Gifu14ImageContainer">ImageContainer</a> <a class="token" href="#/s:4Gifu14ImageContainerP">ImageContainer</a>
</code> </code>
</div> </div>
<div class="height-container"> <div class="height-container">
@ -124,7 +124,7 @@
</section> </section>
<section id="footer"> <section id="footer">
<p>2015 © Reda Lemeden. See LICENSE for more details.</p> <p>2015 © Reda Lemeden. See LICENSE for more details.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p> <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section> </section>
</article> </article>
</div> </div>

View File

@ -72,9 +72,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:vP4Gifu13GIFAnimatable8animatorGSqCS_8Animator_"></a> <a name="/s:4Gifu13GIFAnimatableP8animatorAA8AnimatorCSgv"></a>
<a name="//apple_ref/swift/Property/animator" class="dashAnchor"></a> <a name="//apple_ref/swift/Property/animator" class="dashAnchor"></a>
<a class="token" href="#/s:vP4Gifu13GIFAnimatable8animatorGSqCS_8Animator_">animator</a> <a class="token" href="#/s:4Gifu13GIFAnimatableP8animatorAA8AnimatorCSgv">animator</a>
</code> </code>
</div> </div>
<div class="height-container"> <div class="height-container">
@ -99,9 +99,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:vP4Gifu13GIFAnimatable5layerCSo7CALayer"></a> <a name="/s:4Gifu13GIFAnimatableP5layerSo7CALayerCv"></a>
<a name="//apple_ref/swift/Property/layer" class="dashAnchor"></a> <a name="//apple_ref/swift/Property/layer" class="dashAnchor"></a>
<a class="token" href="#/s:vP4Gifu13GIFAnimatable5layerCSo7CALayer">layer</a> <a class="token" href="#/s:4Gifu13GIFAnimatableP5layerSo7CALayerCv">layer</a>
</code> </code>
</div> </div>
<div class="height-container"> <div class="height-container">
@ -126,9 +126,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:vP4Gifu13GIFAnimatable5frameVSC6CGRect"></a> <a name="/s:4Gifu13GIFAnimatableP5frameSC6CGRectVv"></a>
<a name="//apple_ref/swift/Property/frame" class="dashAnchor"></a> <a name="//apple_ref/swift/Property/frame" class="dashAnchor"></a>
<a class="token" href="#/s:vP4Gifu13GIFAnimatable5frameVSC6CGRect">frame</a> <a class="token" href="#/s:4Gifu13GIFAnimatableP5frameSC6CGRectVv">frame</a>
</code> </code>
</div> </div>
<div class="height-container"> <div class="height-container">
@ -153,9 +153,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:vP4Gifu13GIFAnimatable11contentModeOSC17UIViewContentMode"></a> <a name="/s:4Gifu13GIFAnimatableP11contentModeSC013UIViewContentD0Ov"></a>
<a name="//apple_ref/swift/Property/contentMode" class="dashAnchor"></a> <a name="//apple_ref/swift/Property/contentMode" class="dashAnchor"></a>
<a class="token" href="#/s:vP4Gifu13GIFAnimatable11contentModeOSC17UIViewContentMode">contentMode</a> <a class="token" href="#/s:4Gifu13GIFAnimatableP11contentModeSC013UIViewContentD0Ov">contentMode</a>
</code> </code>
</div> </div>
<div class="height-container"> <div class="height-container">
@ -184,9 +184,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:ve4GifuRxS_13GIFAnimatablexS_14ImageContainerrS0_20intrinsicContentSizeVSC6CGSize"></a> <a name="/s:4Gifu13GIFAnimatablePA2aBRzAA14ImageContainerRzlE20intrinsicContentSizeSC6CGSizeVv"></a>
<a name="//apple_ref/swift/Property/intrinsicContentSize" class="dashAnchor"></a> <a name="//apple_ref/swift/Property/intrinsicContentSize" class="dashAnchor"></a>
<a class="token" href="#/s:ve4GifuRxS_13GIFAnimatablexS_14ImageContainerrS0_20intrinsicContentSizeVSC6CGSize">intrinsicContentSize</a> <a class="token" href="#/s:4Gifu13GIFAnimatablePA2aBRzAA14ImageContainerRzlE20intrinsicContentSizeSC6CGSizeVv">intrinsicContentSize</a>
</code> </code>
<span class="declaration-note"> <span class="declaration-note">
Extension method Extension method
@ -218,9 +218,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:vE4GifuPS_13GIFAnimatable15gifLoopDurationSd"></a> <a name="/s:4Gifu13GIFAnimatablePAAE15gifLoopDurationSdv"></a>
<a name="//apple_ref/swift/Property/gifLoopDuration" class="dashAnchor"></a> <a name="//apple_ref/swift/Property/gifLoopDuration" class="dashAnchor"></a>
<a class="token" href="#/s:vE4GifuPS_13GIFAnimatable15gifLoopDurationSd">gifLoopDuration</a> <a class="token" href="#/s:4Gifu13GIFAnimatablePAAE15gifLoopDurationSdv">gifLoopDuration</a>
</code> </code>
<span class="declaration-note"> <span class="declaration-note">
Extension method Extension method
@ -248,9 +248,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:vE4GifuPS_13GIFAnimatable11activeFrameGSqCSo7UIImage_"></a> <a name="/s:4Gifu13GIFAnimatablePAAE11activeFrameSo7UIImageCSgv"></a>
<a name="//apple_ref/swift/Property/activeFrame" class="dashAnchor"></a> <a name="//apple_ref/swift/Property/activeFrame" class="dashAnchor"></a>
<a class="token" href="#/s:vE4GifuPS_13GIFAnimatable11activeFrameGSqCSo7UIImage_">activeFrame</a> <a class="token" href="#/s:4Gifu13GIFAnimatablePAAE11activeFrameSo7UIImageCSgv">activeFrame</a>
</code> </code>
<span class="declaration-note"> <span class="declaration-note">
Extension method Extension method
@ -278,9 +278,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:vE4GifuPS_13GIFAnimatable10frameCountSi"></a> <a name="/s:4Gifu13GIFAnimatablePAAE10frameCountSiv"></a>
<a name="//apple_ref/swift/Property/frameCount" class="dashAnchor"></a> <a name="//apple_ref/swift/Property/frameCount" class="dashAnchor"></a>
<a class="token" href="#/s:vE4GifuPS_13GIFAnimatable10frameCountSi">frameCount</a> <a class="token" href="#/s:4Gifu13GIFAnimatablePAAE10frameCountSiv">frameCount</a>
</code> </code>
<span class="declaration-note"> <span class="declaration-note">
Extension method Extension method
@ -308,9 +308,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:vE4GifuPS_13GIFAnimatable14isAnimatingGIFSb"></a> <a name="/s:4Gifu13GIFAnimatablePAAE14isAnimatingGIFSbv"></a>
<a name="//apple_ref/swift/Property/isAnimatingGIF" class="dashAnchor"></a> <a name="//apple_ref/swift/Property/isAnimatingGIF" class="dashAnchor"></a>
<a class="token" href="#/s:vE4GifuPS_13GIFAnimatable14isAnimatingGIFSb">isAnimatingGIF</a> <a class="token" href="#/s:4Gifu13GIFAnimatablePAAE14isAnimatingGIFSbv">isAnimatingGIF</a>
</code> </code>
<span class="declaration-note"> <span class="declaration-note">
Extension method Extension method
@ -338,9 +338,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:FE4GifuPS_13GIFAnimatable7animateFT12withGIFNamedSS9loopCountSi_T_"></a> <a name="/s:4Gifu13GIFAnimatablePAAE7animateySS12withGIFNamed_Si9loopCounttF"></a>
<a name="//apple_ref/swift/Method/animate(withGIFNamed:loopCount:)" class="dashAnchor"></a> <a name="//apple_ref/swift/Method/animate(withGIFNamed:loopCount:)" class="dashAnchor"></a>
<a class="token" href="#/s:FE4GifuPS_13GIFAnimatable7animateFT12withGIFNamedSS9loopCountSi_T_">animate(withGIFNamed:loopCount:)</a> <a class="token" href="#/s:4Gifu13GIFAnimatablePAAE7animateySS12withGIFNamed_Si9loopCounttF">animate(withGIFNamed:loopCount:)</a>
</code> </code>
<span class="declaration-note"> <span class="declaration-note">
Extension method Extension method
@ -375,7 +375,6 @@
<td> <td>
<div> <div>
<p>The file name of the GIF in the main bundle.</p> <p>The file name of the GIF in the main bundle.</p>
</div> </div>
</td> </td>
</tr> </tr>
@ -388,7 +387,6 @@
<td> <td>
<div> <div>
<p>Desired number of loops, &lt;= 0 for infinite loop.</p> <p>Desired number of loops, &lt;= 0 for infinite loop.</p>
</div> </div>
</td> </td>
</tr> </tr>
@ -401,9 +399,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:FE4GifuPS_13GIFAnimatable7animateFT11withGIFDataV10Foundation4Data9loopCountSi_T_"></a> <a name="/s:4Gifu13GIFAnimatablePAAE7animatey10Foundation4DataV11withGIFData_Si9loopCounttF"></a>
<a name="//apple_ref/swift/Method/animate(withGIFData:loopCount:)" class="dashAnchor"></a> <a name="//apple_ref/swift/Method/animate(withGIFData:loopCount:)" class="dashAnchor"></a>
<a class="token" href="#/s:FE4GifuPS_13GIFAnimatable7animateFT11withGIFDataV10Foundation4Data9loopCountSi_T_">animate(withGIFData:loopCount:)</a> <a class="token" href="#/s:4Gifu13GIFAnimatablePAAE7animatey10Foundation4DataV11withGIFData_Si9loopCounttF">animate(withGIFData:loopCount:)</a>
</code> </code>
<span class="declaration-note"> <span class="declaration-note">
Extension method Extension method
@ -438,7 +436,6 @@
<td> <td>
<div> <div>
<p>GIF image data.</p> <p>GIF image data.</p>
</div> </div>
</td> </td>
</tr> </tr>
@ -451,7 +448,6 @@
<td> <td>
<div> <div>
<p>Desired number of loops, &lt;= 0 for infinite loop.</p> <p>Desired number of loops, &lt;= 0 for infinite loop.</p>
</div> </div>
</td> </td>
</tr> </tr>
@ -464,72 +460,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:FE4GifuPS_13GIFAnimatable19prepareForAnimationFT12withGIFNamedSS9loopCountSi17completionHandlerGSqFT_T___T_"></a> <a name="/s:4Gifu13GIFAnimatablePAAE7animatey10Foundation3URLV10withGIFURL_Si9loopCounttF"></a>
<a name="//apple_ref/swift/Method/prepareForAnimation(withGIFNamed:loopCount:completionHandler:)" class="dashAnchor"></a> <a name="//apple_ref/swift/Method/animate(withGIFURL:loopCount:)" class="dashAnchor"></a>
<a class="token" href="#/s:FE4GifuPS_13GIFAnimatable19prepareForAnimationFT12withGIFNamedSS9loopCountSi17completionHandlerGSqFT_T___T_">prepareForAnimation(withGIFNamed:loopCount:completionHandler:)</a> <a class="token" href="#/s:4Gifu13GIFAnimatablePAAE7animatey10Foundation3URLV10withGIFURL_Si9loopCounttF">animate(withGIFURL:loopCount:)</a>
</code>
<span class="declaration-note">
Extension method
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Prepares the animator instance for animation.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">prepareForAnimation</span><span class="p">(</span><span class="n">withGIFNamed</span> <span class="nv">imageName</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">loopCount</span><span class="p">:</span> <span class="kt">Int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="nv">completionHandler</span><span class="p">:</span> <span class="p">((</span><span class="kt">Void</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Void</span><span class="p">)?</span> <span class="o">=</span> <span class="o">.</span><span class="k">none</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>imageName</em>
</code>
</td>
<td>
<div>
<p>The file name of the GIF in the main bundle.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>loopCount</em>
</code>
</td>
<td>
<div>
<p>Desired number of loops, &lt;= 0 for infinite loop.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:FE4GifuPS_13GIFAnimatable19prepareForAnimationFT11withGIFDataV10Foundation4Data9loopCountSi17completionHandlerGSqFT_T___T_"></a>
<a name="//apple_ref/swift/Method/prepareForAnimation(withGIFData:loopCount:completionHandler:)" class="dashAnchor"></a>
<a class="token" href="#/s:FE4GifuPS_13GIFAnimatable19prepareForAnimationFT11withGIFDataV10Foundation4Data9loopCountSi17completionHandlerGSqFT_T___T_">prepareForAnimation(withGIFData:loopCount:completionHandler:)</a>
</code> </code>
<span class="declaration-note"> <span class="declaration-note">
Extension method Extension method
@ -547,7 +480,133 @@
<h4>Declaration</h4> <h4>Declaration</h4>
<div class="language"> <div class="language">
<p class="aside-title">Swift</p> <p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">prepareForAnimation</span><span class="p">(</span><span class="n">withGIFData</span> <span class="nv">imageData</span><span class="p">:</span> <span class="kt">Data</span><span class="p">,</span> <span class="nv">loopCount</span><span class="p">:</span> <span class="kt">Int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="nv">completionHandler</span><span class="p">:</span> <span class="p">((</span><span class="kt">Void</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Void</span><span class="p">)?</span> <span class="o">=</span> <span class="o">.</span><span class="k">none</span><span class="p">)</span></code></pre> <pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">animate</span><span class="p">(</span><span class="n">withGIFURL</span> <span class="nv">imageURL</span><span class="p">:</span> <span class="kt">URL</span><span class="p">,</span> <span class="nv">loopCount</span><span class="p">:</span> <span class="kt">Int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>imageURL</em>
</code>
</td>
<td>
<div>
<p>GIF image url.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>loopCount</em>
</code>
</td>
<td>
<div>
<p>Desired number of loops, &lt;= 0 for infinite loop.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Gifu13GIFAnimatablePAAE19prepareForAnimationySS12withGIFNamed_Si9loopCountyycSg17completionHandlertF"></a>
<a name="//apple_ref/swift/Method/prepareForAnimation(withGIFNamed:loopCount:completionHandler:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Gifu13GIFAnimatablePAAE19prepareForAnimationySS12withGIFNamed_Si9loopCountyycSg17completionHandlertF">prepareForAnimation(withGIFNamed:loopCount:completionHandler:)</a>
</code>
<span class="declaration-note">
Extension method
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Prepares the animator instance for animation.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">prepareForAnimation</span><span class="p">(</span><span class="n">withGIFNamed</span> <span class="nv">imageName</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
<span class="nv">loopCount</span><span class="p">:</span> <span class="kt">Int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span>
<span class="nv">completionHandler</span><span class="p">:</span> <span class="p">(()</span> <span class="o">-&gt;</span> <span class="kt">Void</span><span class="p">)?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>imageName</em>
</code>
</td>
<td>
<div>
<p>The file name of the GIF in the main bundle.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>loopCount</em>
</code>
</td>
<td>
<div>
<p>Desired number of loops, &lt;= 0 for infinite loop.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Gifu13GIFAnimatablePAAE19prepareForAnimationy10Foundation4DataV11withGIFData_Si9loopCountyycSg17completionHandlertF"></a>
<a name="//apple_ref/swift/Method/prepareForAnimation(withGIFData:loopCount:completionHandler:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Gifu13GIFAnimatablePAAE19prepareForAnimationy10Foundation4DataV11withGIFData_Si9loopCountyycSg17completionHandlertF">prepareForAnimation(withGIFData:loopCount:completionHandler:)</a>
</code>
<span class="declaration-note">
Extension method
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Prepare for animation and start animating immediately.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">prepareForAnimation</span><span class="p">(</span><span class="n">withGIFData</span> <span class="nv">imageData</span><span class="p">:</span> <span class="kt">Data</span><span class="p">,</span>
<span class="nv">loopCount</span><span class="p">:</span> <span class="kt">Int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span>
<span class="nv">completionHandler</span><span class="p">:</span> <span class="p">(()</span> <span class="o">-&gt;</span> <span class="kt">Void</span><span class="p">)?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
</div> </div>
</div> </div>
@ -564,7 +623,6 @@
<td> <td>
<div> <div>
<p>GIF image data.</p> <p>GIF image data.</p>
</div> </div>
</td> </td>
</tr> </tr>
@ -577,7 +635,6 @@
<td> <td>
<div> <div>
<p>Desired number of loops, &lt;= 0 for infinite loop.</p> <p>Desired number of loops, &lt;= 0 for infinite loop.</p>
</div> </div>
</td> </td>
</tr> </tr>
@ -590,9 +647,72 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:FE4GifuPS_13GIFAnimatable15prepareForReuseFT_T_"></a> <a name="/s:4Gifu13GIFAnimatablePAAE19prepareForAnimationy10Foundation3URLV10withGIFURL_Si9loopCountyycSg17completionHandlertF"></a>
<a name="//apple_ref/swift/Method/prepareForAnimation(withGIFURL:loopCount:completionHandler:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Gifu13GIFAnimatablePAAE19prepareForAnimationy10Foundation3URLV10withGIFURL_Si9loopCountyycSg17completionHandlertF">prepareForAnimation(withGIFURL:loopCount:completionHandler:)</a>
</code>
<span class="declaration-note">
Extension method
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Prepare for animation and start animating immediately.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">prepareForAnimation</span><span class="p">(</span><span class="n">withGIFURL</span> <span class="nv">imageURL</span><span class="p">:</span> <span class="kt">URL</span><span class="p">,</span>
<span class="nv">loopCount</span><span class="p">:</span> <span class="kt">Int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span>
<span class="nv">completionHandler</span><span class="p">:</span> <span class="p">(()</span> <span class="o">-&gt;</span> <span class="kt">Void</span><span class="p">)?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>imageURL</em>
</code>
</td>
<td>
<div>
<p>GIF image url.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>loopCount</em>
</code>
</td>
<td>
<div>
<p>Desired number of loops, &lt;= 0 for infinite loop.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Gifu13GIFAnimatablePAAE15prepareForReuseyyF"></a>
<a name="//apple_ref/swift/Method/prepareForReuse()" class="dashAnchor"></a> <a name="//apple_ref/swift/Method/prepareForReuse()" class="dashAnchor"></a>
<a class="token" href="#/s:FE4GifuPS_13GIFAnimatable15prepareForReuseFT_T_">prepareForReuse()</a> <a class="token" href="#/s:4Gifu13GIFAnimatablePAAE15prepareForReuseyyF">prepareForReuse()</a>
</code> </code>
<span class="declaration-note"> <span class="declaration-note">
Extension method Extension method
@ -620,9 +740,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:FE4GifuPS_13GIFAnimatable17startAnimatingGIFFT_T_"></a> <a name="/s:4Gifu13GIFAnimatablePAAE17startAnimatingGIFyyF"></a>
<a name="//apple_ref/swift/Method/startAnimatingGIF()" class="dashAnchor"></a> <a name="//apple_ref/swift/Method/startAnimatingGIF()" class="dashAnchor"></a>
<a class="token" href="#/s:FE4GifuPS_13GIFAnimatable17startAnimatingGIFFT_T_">startAnimatingGIF()</a> <a class="token" href="#/s:4Gifu13GIFAnimatablePAAE17startAnimatingGIFyyF">startAnimatingGIF()</a>
</code> </code>
<span class="declaration-note"> <span class="declaration-note">
Extension method Extension method
@ -650,9 +770,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:FE4GifuPS_13GIFAnimatable16stopAnimatingGIFFT_T_"></a> <a name="/s:4Gifu13GIFAnimatablePAAE16stopAnimatingGIFyyF"></a>
<a name="//apple_ref/swift/Method/stopAnimatingGIF()" class="dashAnchor"></a> <a name="//apple_ref/swift/Method/stopAnimatingGIF()" class="dashAnchor"></a>
<a class="token" href="#/s:FE4GifuPS_13GIFAnimatable16stopAnimatingGIFFT_T_">stopAnimatingGIF()</a> <a class="token" href="#/s:4Gifu13GIFAnimatablePAAE16stopAnimatingGIFyyF">stopAnimatingGIF()</a>
</code> </code>
<span class="declaration-note"> <span class="declaration-note">
Extension method Extension method
@ -680,9 +800,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:FE4GifuPS_13GIFAnimatable21setShouldResizeFramesFSbT_"></a> <a name="/s:4Gifu13GIFAnimatablePAAE21setShouldResizeFramesySbF"></a>
<a name="//apple_ref/swift/Method/setShouldResizeFrames(_:)" class="dashAnchor"></a> <a name="//apple_ref/swift/Method/setShouldResizeFrames(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:FE4GifuPS_13GIFAnimatable21setShouldResizeFramesFSbT_">setShouldResizeFrames(_:)</a> <a class="token" href="#/s:4Gifu13GIFAnimatablePAAE21setShouldResizeFramesySbF">setShouldResizeFrames(_:)</a>
</code> </code>
<span class="declaration-note"> <span class="declaration-note">
Extension method Extension method
@ -717,7 +837,6 @@
<td> <td>
<div> <div>
<p>Boolean value indicating whether individual frames should be resized.</p> <p>Boolean value indicating whether individual frames should be resized.</p>
</div> </div>
</td> </td>
</tr> </tr>
@ -730,9 +849,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:FE4GifuPS_13GIFAnimatable19setFrameBufferCountFSiT_"></a> <a name="/s:4Gifu13GIFAnimatablePAAE19setFrameBufferCountySiF"></a>
<a name="//apple_ref/swift/Method/setFrameBufferCount(_:)" class="dashAnchor"></a> <a name="//apple_ref/swift/Method/setFrameBufferCount(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:FE4GifuPS_13GIFAnimatable19setFrameBufferCountFSiT_">setFrameBufferCount(_:)</a> <a class="token" href="#/s:4Gifu13GIFAnimatablePAAE19setFrameBufferCountySiF">setFrameBufferCount(_:)</a>
</code> </code>
<span class="declaration-note"> <span class="declaration-note">
Extension method Extension method
@ -767,7 +886,6 @@
<td> <td>
<div> <div>
<p>The number of frames to buffer.</p> <p>The number of frames to buffer.</p>
</div> </div>
</td> </td>
</tr> </tr>
@ -780,9 +898,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:FE4GifuPS_13GIFAnimatable19updateImageIfNeededFT_T_"></a> <a name="/s:4Gifu13GIFAnimatablePAAE19updateImageIfNeededyyF"></a>
<a name="//apple_ref/swift/Method/updateImageIfNeeded()" class="dashAnchor"></a> <a name="//apple_ref/swift/Method/updateImageIfNeeded()" class="dashAnchor"></a>
<a class="token" href="#/s:FE4GifuPS_13GIFAnimatable19updateImageIfNeededFT_T_">updateImageIfNeeded()</a> <a class="token" href="#/s:4Gifu13GIFAnimatablePAAE19updateImageIfNeededyyF">updateImageIfNeeded()</a>
</code> </code>
<span class="declaration-note"> <span class="declaration-note">
Extension method Extension method
@ -813,7 +931,7 @@
</section> </section>
<section id="footer"> <section id="footer">
<p>2015 © Reda Lemeden. See LICENSE for more details.</p> <p>2015 © Reda Lemeden. See LICENSE for more details.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p> <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section> </section>
</article> </article>
</div> </div>

View File

@ -72,9 +72,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:vP4Gifu14ImageContainer5imageGSqCSo7UIImage_"></a> <a name="/s:4Gifu14ImageContainerP5imageSo7UIImageCSgv"></a>
<a name="//apple_ref/swift/Property/image" class="dashAnchor"></a> <a name="//apple_ref/swift/Property/image" class="dashAnchor"></a>
<a class="token" href="#/s:vP4Gifu14ImageContainer5imageGSqCSo7UIImage_">image</a> <a class="token" href="#/s:4Gifu14ImageContainerP5imageSo7UIImageCSgv">image</a>
</code> </code>
</div> </div>
<div class="height-container"> <div class="height-container">
@ -102,7 +102,7 @@
</section> </section>
<section id="footer"> <section id="footer">
<p>2015 © Reda Lemeden. See LICENSE for more details.</p> <p>2015 © Reda Lemeden. See LICENSE for more details.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p> <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section> </section>
</article> </article>
</div> </div>

28
docs/badge.svg Normal file
View File

@ -0,0 +1,28 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="136" height="20">
<linearGradient id="b" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
</linearGradient>
<clipPath id="a">
<rect width="136" height="20" rx="3" fill="#fff"/>
</clipPath>
<g clip-path="url(#a)">
<path fill="#555" d="M0 0h93v20H0z"/>
<path fill="#4c1" d="M93 0h43v20H93z"/>
<path fill="url(#b)" d="M0 0h136v20H0z"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110">
<text x="475" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="830">
documentation
</text>
<text x="475" y="140" transform="scale(.1)" textLength="830">
documentation
</text>
<text x="1135" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="330">
100%
</text>
<text x="1135" y="140" transform="scale(.1)" textLength="330">
100%
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -164,6 +164,11 @@ header {
padding-top: 10px; } padding-top: 10px; }
.main-content section .task-group-section .task-group:first-of-type .section-name { .main-content section .task-group-section .task-group:first-of-type .section-name {
padding-top: 15px; } padding-top: 15px; }
.main-content section .heading:before {
content: "";
display: block;
padding-top: 70px;
margin: -70px 0 0; }
.section { .section {
padding: 0 25px; } padding: 0 25px; }

View File

@ -65,9 +65,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:C4Gifu12GIFImageView"></a> <a name="/c:@M@Gifu@objc(cs)GIFImageView"></a>
<a name="//apple_ref/swift/Class/GIFImageView" class="dashAnchor"></a> <a name="//apple_ref/swift/Class/GIFImageView" class="dashAnchor"></a>
<a class="token" href="#/s:C4Gifu12GIFImageView">GIFImageView</a> <a class="token" href="#/c:@M@Gifu@objc(cs)GIFImageView">GIFImageView</a>
</code> </code>
</div> </div>
<div class="height-container"> <div class="height-container">
@ -97,9 +97,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:C4Gifu8Animator"></a> <a name="/s:4Gifu8AnimatorC"></a>
<a name="//apple_ref/swift/Class/Animator" class="dashAnchor"></a> <a name="//apple_ref/swift/Class/Animator" class="dashAnchor"></a>
<a class="token" href="#/s:C4Gifu8Animator">Animator</a> <a class="token" href="#/s:4Gifu8AnimatorC">Animator</a>
</code> </code>
</div> </div>
<div class="height-container"> <div class="height-container">
@ -128,7 +128,7 @@
</section> </section>
<section id="footer"> <section id="footer">
<p>2015 © Reda Lemeden. See LICENSE for more details.</p> <p>2015 © Reda Lemeden. See LICENSE for more details.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p> <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section> </section>
</article> </article>
</div> </div>

View File

@ -72,9 +72,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:FC4Gifu8AnimatorcFT12withDelegatePS_13GIFAnimatable__S0_"></a> <a name="/s:4Gifu8AnimatorCAcA13GIFAnimatable_p12withDelegate_tcfc"></a>
<a name="//apple_ref/swift/Method/init(withDelegate:)" class="dashAnchor"></a> <a name="//apple_ref/swift/Method/init(withDelegate:)" class="dashAnchor"></a>
<a class="token" href="#/s:FC4Gifu8AnimatorcFT12withDelegatePS_13GIFAnimatable__S0_">init(withDelegate:)</a> <a class="token" href="#/s:4Gifu8AnimatorCAcA13GIFAnimatable_p12withDelegate_tcfc">init(withDelegate:)</a>
</code> </code>
</div> </div>
<div class="height-container"> <div class="height-container">
@ -105,8 +105,7 @@
</td> </td>
<td> <td>
<div> <div>
<p>A view object that implements the <code>GIFAnimatable</code> protocol.</p> <p>A view object that implements the <code><a href="../Protocols/GIFAnimatable.html">GIFAnimatable</a></code> protocol.</p>
</div> </div>
</td> </td>
</tr> </tr>
@ -116,7 +115,6 @@
<div> <div>
<h4>Return Value</h4> <h4>Return Value</h4>
<p>A new animator instance.</p> <p>A new animator instance.</p>
</div> </div>
</section> </section>
</div> </div>
@ -127,7 +125,7 @@
</section> </section>
<section id="footer"> <section id="footer">
<p>2015 © Reda Lemeden. See LICENSE for more details.</p> <p>2015 © Reda Lemeden. See LICENSE for more details.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p> <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section> </section>
</article> </article>
</div> </div>

View File

@ -72,9 +72,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:vC4Gifu12GIFImageView8animatorGSqCS_8Animator_"></a> <a name="/s:4Gifu12GIFImageViewC8animatorAA8AnimatorCSgv"></a>
<a name="//apple_ref/swift/Property/animator" class="dashAnchor"></a> <a name="//apple_ref/swift/Property/animator" class="dashAnchor"></a>
<a class="token" href="#/s:vC4Gifu12GIFImageView8animatorGSqCS_8Animator_">animator</a> <a class="token" href="#/s:4Gifu12GIFImageViewC8animatorAA8AnimatorCSgv">animator</a>
</code> </code>
</div> </div>
<div class="height-container"> <div class="height-container">
@ -99,9 +99,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:FC4Gifu12GIFImageView7displayFCSo7CALayerT_"></a> <a name="/c:@M@Gifu@objc(cs)GIFImageView(im)displayLayer:"></a>
<a name="//apple_ref/swift/Method/display(_:)" class="dashAnchor"></a> <a name="//apple_ref/swift/Method/display(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:FC4Gifu12GIFImageView7displayFCSo7CALayerT_">display(_:)</a> <a class="token" href="#/c:@M@Gifu@objc(cs)GIFImageView(im)displayLayer:">display(_:)</a>
</code> </code>
</div> </div>
<div class="height-container"> <div class="height-container">
@ -133,7 +133,6 @@
<td> <td>
<div> <div>
<p>The delegated layer.</p> <p>The delegated layer.</p>
</div> </div>
</td> </td>
</tr> </tr>
@ -149,7 +148,7 @@
</section> </section>
<section id="footer"> <section id="footer">
<p>2015 © Reda Lemeden. See LICENSE for more details.</p> <p>2015 © Reda Lemeden. See LICENSE for more details.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p> <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section> </section>
</article> </article>
</div> </div>

View File

@ -65,9 +65,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:P4Gifu13GIFAnimatable"></a> <a name="/s:4Gifu13GIFAnimatableP"></a>
<a name="//apple_ref/swift/Protocol/GIFAnimatable" class="dashAnchor"></a> <a name="//apple_ref/swift/Protocol/GIFAnimatable" class="dashAnchor"></a>
<a class="token" href="#/s:P4Gifu13GIFAnimatable">GIFAnimatable</a> <a class="token" href="#/s:4Gifu13GIFAnimatableP">GIFAnimatable</a>
</code> </code>
</div> </div>
<div class="height-container"> <div class="height-container">
@ -93,9 +93,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:P4Gifu14ImageContainer"></a> <a name="/s:4Gifu14ImageContainerP"></a>
<a name="//apple_ref/swift/Protocol/ImageContainer" class="dashAnchor"></a> <a name="//apple_ref/swift/Protocol/ImageContainer" class="dashAnchor"></a>
<a class="token" href="#/s:P4Gifu14ImageContainer">ImageContainer</a> <a class="token" href="#/s:4Gifu14ImageContainerP">ImageContainer</a>
</code> </code>
</div> </div>
<div class="height-container"> <div class="height-container">
@ -124,7 +124,7 @@
</section> </section>
<section id="footer"> <section id="footer">
<p>2015 © Reda Lemeden. See LICENSE for more details.</p> <p>2015 © Reda Lemeden. See LICENSE for more details.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p> <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section> </section>
</article> </article>
</div> </div>

View File

@ -72,9 +72,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:vP4Gifu13GIFAnimatable8animatorGSqCS_8Animator_"></a> <a name="/s:4Gifu13GIFAnimatableP8animatorAA8AnimatorCSgv"></a>
<a name="//apple_ref/swift/Property/animator" class="dashAnchor"></a> <a name="//apple_ref/swift/Property/animator" class="dashAnchor"></a>
<a class="token" href="#/s:vP4Gifu13GIFAnimatable8animatorGSqCS_8Animator_">animator</a> <a class="token" href="#/s:4Gifu13GIFAnimatableP8animatorAA8AnimatorCSgv">animator</a>
</code> </code>
</div> </div>
<div class="height-container"> <div class="height-container">
@ -99,9 +99,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:vP4Gifu13GIFAnimatable5layerCSo7CALayer"></a> <a name="/s:4Gifu13GIFAnimatableP5layerSo7CALayerCv"></a>
<a name="//apple_ref/swift/Property/layer" class="dashAnchor"></a> <a name="//apple_ref/swift/Property/layer" class="dashAnchor"></a>
<a class="token" href="#/s:vP4Gifu13GIFAnimatable5layerCSo7CALayer">layer</a> <a class="token" href="#/s:4Gifu13GIFAnimatableP5layerSo7CALayerCv">layer</a>
</code> </code>
</div> </div>
<div class="height-container"> <div class="height-container">
@ -126,9 +126,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:vP4Gifu13GIFAnimatable5frameVSC6CGRect"></a> <a name="/s:4Gifu13GIFAnimatableP5frameSC6CGRectVv"></a>
<a name="//apple_ref/swift/Property/frame" class="dashAnchor"></a> <a name="//apple_ref/swift/Property/frame" class="dashAnchor"></a>
<a class="token" href="#/s:vP4Gifu13GIFAnimatable5frameVSC6CGRect">frame</a> <a class="token" href="#/s:4Gifu13GIFAnimatableP5frameSC6CGRectVv">frame</a>
</code> </code>
</div> </div>
<div class="height-container"> <div class="height-container">
@ -153,9 +153,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:vP4Gifu13GIFAnimatable11contentModeOSC17UIViewContentMode"></a> <a name="/s:4Gifu13GIFAnimatableP11contentModeSC013UIViewContentD0Ov"></a>
<a name="//apple_ref/swift/Property/contentMode" class="dashAnchor"></a> <a name="//apple_ref/swift/Property/contentMode" class="dashAnchor"></a>
<a class="token" href="#/s:vP4Gifu13GIFAnimatable11contentModeOSC17UIViewContentMode">contentMode</a> <a class="token" href="#/s:4Gifu13GIFAnimatableP11contentModeSC013UIViewContentD0Ov">contentMode</a>
</code> </code>
</div> </div>
<div class="height-container"> <div class="height-container">
@ -184,9 +184,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:ve4GifuRxS_13GIFAnimatablexS_14ImageContainerrS0_20intrinsicContentSizeVSC6CGSize"></a> <a name="/s:4Gifu13GIFAnimatablePA2aBRzAA14ImageContainerRzlE20intrinsicContentSizeSC6CGSizeVv"></a>
<a name="//apple_ref/swift/Property/intrinsicContentSize" class="dashAnchor"></a> <a name="//apple_ref/swift/Property/intrinsicContentSize" class="dashAnchor"></a>
<a class="token" href="#/s:ve4GifuRxS_13GIFAnimatablexS_14ImageContainerrS0_20intrinsicContentSizeVSC6CGSize">intrinsicContentSize</a> <a class="token" href="#/s:4Gifu13GIFAnimatablePA2aBRzAA14ImageContainerRzlE20intrinsicContentSizeSC6CGSizeVv">intrinsicContentSize</a>
</code> </code>
<span class="declaration-note"> <span class="declaration-note">
Extension method Extension method
@ -218,9 +218,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:vE4GifuPS_13GIFAnimatable15gifLoopDurationSd"></a> <a name="/s:4Gifu13GIFAnimatablePAAE15gifLoopDurationSdv"></a>
<a name="//apple_ref/swift/Property/gifLoopDuration" class="dashAnchor"></a> <a name="//apple_ref/swift/Property/gifLoopDuration" class="dashAnchor"></a>
<a class="token" href="#/s:vE4GifuPS_13GIFAnimatable15gifLoopDurationSd">gifLoopDuration</a> <a class="token" href="#/s:4Gifu13GIFAnimatablePAAE15gifLoopDurationSdv">gifLoopDuration</a>
</code> </code>
<span class="declaration-note"> <span class="declaration-note">
Extension method Extension method
@ -248,9 +248,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:vE4GifuPS_13GIFAnimatable11activeFrameGSqCSo7UIImage_"></a> <a name="/s:4Gifu13GIFAnimatablePAAE11activeFrameSo7UIImageCSgv"></a>
<a name="//apple_ref/swift/Property/activeFrame" class="dashAnchor"></a> <a name="//apple_ref/swift/Property/activeFrame" class="dashAnchor"></a>
<a class="token" href="#/s:vE4GifuPS_13GIFAnimatable11activeFrameGSqCSo7UIImage_">activeFrame</a> <a class="token" href="#/s:4Gifu13GIFAnimatablePAAE11activeFrameSo7UIImageCSgv">activeFrame</a>
</code> </code>
<span class="declaration-note"> <span class="declaration-note">
Extension method Extension method
@ -278,9 +278,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:vE4GifuPS_13GIFAnimatable10frameCountSi"></a> <a name="/s:4Gifu13GIFAnimatablePAAE10frameCountSiv"></a>
<a name="//apple_ref/swift/Property/frameCount" class="dashAnchor"></a> <a name="//apple_ref/swift/Property/frameCount" class="dashAnchor"></a>
<a class="token" href="#/s:vE4GifuPS_13GIFAnimatable10frameCountSi">frameCount</a> <a class="token" href="#/s:4Gifu13GIFAnimatablePAAE10frameCountSiv">frameCount</a>
</code> </code>
<span class="declaration-note"> <span class="declaration-note">
Extension method Extension method
@ -308,9 +308,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:vE4GifuPS_13GIFAnimatable14isAnimatingGIFSb"></a> <a name="/s:4Gifu13GIFAnimatablePAAE14isAnimatingGIFSbv"></a>
<a name="//apple_ref/swift/Property/isAnimatingGIF" class="dashAnchor"></a> <a name="//apple_ref/swift/Property/isAnimatingGIF" class="dashAnchor"></a>
<a class="token" href="#/s:vE4GifuPS_13GIFAnimatable14isAnimatingGIFSb">isAnimatingGIF</a> <a class="token" href="#/s:4Gifu13GIFAnimatablePAAE14isAnimatingGIFSbv">isAnimatingGIF</a>
</code> </code>
<span class="declaration-note"> <span class="declaration-note">
Extension method Extension method
@ -338,9 +338,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:FE4GifuPS_13GIFAnimatable7animateFT12withGIFNamedSS9loopCountSi_T_"></a> <a name="/s:4Gifu13GIFAnimatablePAAE7animateySS12withGIFNamed_Si9loopCounttF"></a>
<a name="//apple_ref/swift/Method/animate(withGIFNamed:loopCount:)" class="dashAnchor"></a> <a name="//apple_ref/swift/Method/animate(withGIFNamed:loopCount:)" class="dashAnchor"></a>
<a class="token" href="#/s:FE4GifuPS_13GIFAnimatable7animateFT12withGIFNamedSS9loopCountSi_T_">animate(withGIFNamed:loopCount:)</a> <a class="token" href="#/s:4Gifu13GIFAnimatablePAAE7animateySS12withGIFNamed_Si9loopCounttF">animate(withGIFNamed:loopCount:)</a>
</code> </code>
<span class="declaration-note"> <span class="declaration-note">
Extension method Extension method
@ -375,7 +375,6 @@
<td> <td>
<div> <div>
<p>The file name of the GIF in the main bundle.</p> <p>The file name of the GIF in the main bundle.</p>
</div> </div>
</td> </td>
</tr> </tr>
@ -388,7 +387,6 @@
<td> <td>
<div> <div>
<p>Desired number of loops, &lt;= 0 for infinite loop.</p> <p>Desired number of loops, &lt;= 0 for infinite loop.</p>
</div> </div>
</td> </td>
</tr> </tr>
@ -401,9 +399,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:FE4GifuPS_13GIFAnimatable7animateFT11withGIFDataV10Foundation4Data9loopCountSi_T_"></a> <a name="/s:4Gifu13GIFAnimatablePAAE7animatey10Foundation4DataV11withGIFData_Si9loopCounttF"></a>
<a name="//apple_ref/swift/Method/animate(withGIFData:loopCount:)" class="dashAnchor"></a> <a name="//apple_ref/swift/Method/animate(withGIFData:loopCount:)" class="dashAnchor"></a>
<a class="token" href="#/s:FE4GifuPS_13GIFAnimatable7animateFT11withGIFDataV10Foundation4Data9loopCountSi_T_">animate(withGIFData:loopCount:)</a> <a class="token" href="#/s:4Gifu13GIFAnimatablePAAE7animatey10Foundation4DataV11withGIFData_Si9loopCounttF">animate(withGIFData:loopCount:)</a>
</code> </code>
<span class="declaration-note"> <span class="declaration-note">
Extension method Extension method
@ -438,7 +436,6 @@
<td> <td>
<div> <div>
<p>GIF image data.</p> <p>GIF image data.</p>
</div> </div>
</td> </td>
</tr> </tr>
@ -451,7 +448,6 @@
<td> <td>
<div> <div>
<p>Desired number of loops, &lt;= 0 for infinite loop.</p> <p>Desired number of loops, &lt;= 0 for infinite loop.</p>
</div> </div>
</td> </td>
</tr> </tr>
@ -464,72 +460,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:FE4GifuPS_13GIFAnimatable19prepareForAnimationFT12withGIFNamedSS9loopCountSi17completionHandlerGSqFT_T___T_"></a> <a name="/s:4Gifu13GIFAnimatablePAAE7animatey10Foundation3URLV10withGIFURL_Si9loopCounttF"></a>
<a name="//apple_ref/swift/Method/prepareForAnimation(withGIFNamed:loopCount:completionHandler:)" class="dashAnchor"></a> <a name="//apple_ref/swift/Method/animate(withGIFURL:loopCount:)" class="dashAnchor"></a>
<a class="token" href="#/s:FE4GifuPS_13GIFAnimatable19prepareForAnimationFT12withGIFNamedSS9loopCountSi17completionHandlerGSqFT_T___T_">prepareForAnimation(withGIFNamed:loopCount:completionHandler:)</a> <a class="token" href="#/s:4Gifu13GIFAnimatablePAAE7animatey10Foundation3URLV10withGIFURL_Si9loopCounttF">animate(withGIFURL:loopCount:)</a>
</code>
<span class="declaration-note">
Extension method
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Prepares the animator instance for animation.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">prepareForAnimation</span><span class="p">(</span><span class="n">withGIFNamed</span> <span class="nv">imageName</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">loopCount</span><span class="p">:</span> <span class="kt">Int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="nv">completionHandler</span><span class="p">:</span> <span class="p">((</span><span class="kt">Void</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Void</span><span class="p">)?</span> <span class="o">=</span> <span class="o">.</span><span class="k">none</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>imageName</em>
</code>
</td>
<td>
<div>
<p>The file name of the GIF in the main bundle.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>loopCount</em>
</code>
</td>
<td>
<div>
<p>Desired number of loops, &lt;= 0 for infinite loop.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:FE4GifuPS_13GIFAnimatable19prepareForAnimationFT11withGIFDataV10Foundation4Data9loopCountSi17completionHandlerGSqFT_T___T_"></a>
<a name="//apple_ref/swift/Method/prepareForAnimation(withGIFData:loopCount:completionHandler:)" class="dashAnchor"></a>
<a class="token" href="#/s:FE4GifuPS_13GIFAnimatable19prepareForAnimationFT11withGIFDataV10Foundation4Data9loopCountSi17completionHandlerGSqFT_T___T_">prepareForAnimation(withGIFData:loopCount:completionHandler:)</a>
</code> </code>
<span class="declaration-note"> <span class="declaration-note">
Extension method Extension method
@ -547,7 +480,133 @@
<h4>Declaration</h4> <h4>Declaration</h4>
<div class="language"> <div class="language">
<p class="aside-title">Swift</p> <p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">prepareForAnimation</span><span class="p">(</span><span class="n">withGIFData</span> <span class="nv">imageData</span><span class="p">:</span> <span class="kt">Data</span><span class="p">,</span> <span class="nv">loopCount</span><span class="p">:</span> <span class="kt">Int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="nv">completionHandler</span><span class="p">:</span> <span class="p">((</span><span class="kt">Void</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Void</span><span class="p">)?</span> <span class="o">=</span> <span class="o">.</span><span class="k">none</span><span class="p">)</span></code></pre> <pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">animate</span><span class="p">(</span><span class="n">withGIFURL</span> <span class="nv">imageURL</span><span class="p">:</span> <span class="kt">URL</span><span class="p">,</span> <span class="nv">loopCount</span><span class="p">:</span> <span class="kt">Int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>imageURL</em>
</code>
</td>
<td>
<div>
<p>GIF image url.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>loopCount</em>
</code>
</td>
<td>
<div>
<p>Desired number of loops, &lt;= 0 for infinite loop.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Gifu13GIFAnimatablePAAE19prepareForAnimationySS12withGIFNamed_Si9loopCountyycSg17completionHandlertF"></a>
<a name="//apple_ref/swift/Method/prepareForAnimation(withGIFNamed:loopCount:completionHandler:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Gifu13GIFAnimatablePAAE19prepareForAnimationySS12withGIFNamed_Si9loopCountyycSg17completionHandlertF">prepareForAnimation(withGIFNamed:loopCount:completionHandler:)</a>
</code>
<span class="declaration-note">
Extension method
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Prepares the animator instance for animation.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">prepareForAnimation</span><span class="p">(</span><span class="n">withGIFNamed</span> <span class="nv">imageName</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span>
<span class="nv">loopCount</span><span class="p">:</span> <span class="kt">Int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span>
<span class="nv">completionHandler</span><span class="p">:</span> <span class="p">(()</span> <span class="o">-&gt;</span> <span class="kt">Void</span><span class="p">)?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>imageName</em>
</code>
</td>
<td>
<div>
<p>The file name of the GIF in the main bundle.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>loopCount</em>
</code>
</td>
<td>
<div>
<p>Desired number of loops, &lt;= 0 for infinite loop.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Gifu13GIFAnimatablePAAE19prepareForAnimationy10Foundation4DataV11withGIFData_Si9loopCountyycSg17completionHandlertF"></a>
<a name="//apple_ref/swift/Method/prepareForAnimation(withGIFData:loopCount:completionHandler:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Gifu13GIFAnimatablePAAE19prepareForAnimationy10Foundation4DataV11withGIFData_Si9loopCountyycSg17completionHandlertF">prepareForAnimation(withGIFData:loopCount:completionHandler:)</a>
</code>
<span class="declaration-note">
Extension method
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Prepare for animation and start animating immediately.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">prepareForAnimation</span><span class="p">(</span><span class="n">withGIFData</span> <span class="nv">imageData</span><span class="p">:</span> <span class="kt">Data</span><span class="p">,</span>
<span class="nv">loopCount</span><span class="p">:</span> <span class="kt">Int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span>
<span class="nv">completionHandler</span><span class="p">:</span> <span class="p">(()</span> <span class="o">-&gt;</span> <span class="kt">Void</span><span class="p">)?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
</div> </div>
</div> </div>
@ -564,7 +623,6 @@
<td> <td>
<div> <div>
<p>GIF image data.</p> <p>GIF image data.</p>
</div> </div>
</td> </td>
</tr> </tr>
@ -577,7 +635,6 @@
<td> <td>
<div> <div>
<p>Desired number of loops, &lt;= 0 for infinite loop.</p> <p>Desired number of loops, &lt;= 0 for infinite loop.</p>
</div> </div>
</td> </td>
</tr> </tr>
@ -590,9 +647,72 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:FE4GifuPS_13GIFAnimatable15prepareForReuseFT_T_"></a> <a name="/s:4Gifu13GIFAnimatablePAAE19prepareForAnimationy10Foundation3URLV10withGIFURL_Si9loopCountyycSg17completionHandlertF"></a>
<a name="//apple_ref/swift/Method/prepareForAnimation(withGIFURL:loopCount:completionHandler:)" class="dashAnchor"></a>
<a class="token" href="#/s:4Gifu13GIFAnimatablePAAE19prepareForAnimationy10Foundation3URLV10withGIFURL_Si9loopCountyycSg17completionHandlertF">prepareForAnimation(withGIFURL:loopCount:completionHandler:)</a>
</code>
<span class="declaration-note">
Extension method
</span>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Prepare for animation and start animating immediately.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">prepareForAnimation</span><span class="p">(</span><span class="n">withGIFURL</span> <span class="nv">imageURL</span><span class="p">:</span> <span class="kt">URL</span><span class="p">,</span>
<span class="nv">loopCount</span><span class="p">:</span> <span class="kt">Int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span>
<span class="nv">completionHandler</span><span class="p">:</span> <span class="p">(()</span> <span class="o">-&gt;</span> <span class="kt">Void</span><span class="p">)?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>imageURL</em>
</code>
</td>
<td>
<div>
<p>GIF image url.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>loopCount</em>
</code>
</td>
<td>
<div>
<p>Desired number of loops, &lt;= 0 for infinite loop.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:4Gifu13GIFAnimatablePAAE15prepareForReuseyyF"></a>
<a name="//apple_ref/swift/Method/prepareForReuse()" class="dashAnchor"></a> <a name="//apple_ref/swift/Method/prepareForReuse()" class="dashAnchor"></a>
<a class="token" href="#/s:FE4GifuPS_13GIFAnimatable15prepareForReuseFT_T_">prepareForReuse()</a> <a class="token" href="#/s:4Gifu13GIFAnimatablePAAE15prepareForReuseyyF">prepareForReuse()</a>
</code> </code>
<span class="declaration-note"> <span class="declaration-note">
Extension method Extension method
@ -620,9 +740,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:FE4GifuPS_13GIFAnimatable17startAnimatingGIFFT_T_"></a> <a name="/s:4Gifu13GIFAnimatablePAAE17startAnimatingGIFyyF"></a>
<a name="//apple_ref/swift/Method/startAnimatingGIF()" class="dashAnchor"></a> <a name="//apple_ref/swift/Method/startAnimatingGIF()" class="dashAnchor"></a>
<a class="token" href="#/s:FE4GifuPS_13GIFAnimatable17startAnimatingGIFFT_T_">startAnimatingGIF()</a> <a class="token" href="#/s:4Gifu13GIFAnimatablePAAE17startAnimatingGIFyyF">startAnimatingGIF()</a>
</code> </code>
<span class="declaration-note"> <span class="declaration-note">
Extension method Extension method
@ -650,9 +770,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:FE4GifuPS_13GIFAnimatable16stopAnimatingGIFFT_T_"></a> <a name="/s:4Gifu13GIFAnimatablePAAE16stopAnimatingGIFyyF"></a>
<a name="//apple_ref/swift/Method/stopAnimatingGIF()" class="dashAnchor"></a> <a name="//apple_ref/swift/Method/stopAnimatingGIF()" class="dashAnchor"></a>
<a class="token" href="#/s:FE4GifuPS_13GIFAnimatable16stopAnimatingGIFFT_T_">stopAnimatingGIF()</a> <a class="token" href="#/s:4Gifu13GIFAnimatablePAAE16stopAnimatingGIFyyF">stopAnimatingGIF()</a>
</code> </code>
<span class="declaration-note"> <span class="declaration-note">
Extension method Extension method
@ -680,9 +800,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:FE4GifuPS_13GIFAnimatable21setShouldResizeFramesFSbT_"></a> <a name="/s:4Gifu13GIFAnimatablePAAE21setShouldResizeFramesySbF"></a>
<a name="//apple_ref/swift/Method/setShouldResizeFrames(_:)" class="dashAnchor"></a> <a name="//apple_ref/swift/Method/setShouldResizeFrames(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:FE4GifuPS_13GIFAnimatable21setShouldResizeFramesFSbT_">setShouldResizeFrames(_:)</a> <a class="token" href="#/s:4Gifu13GIFAnimatablePAAE21setShouldResizeFramesySbF">setShouldResizeFrames(_:)</a>
</code> </code>
<span class="declaration-note"> <span class="declaration-note">
Extension method Extension method
@ -717,7 +837,6 @@
<td> <td>
<div> <div>
<p>Boolean value indicating whether individual frames should be resized.</p> <p>Boolean value indicating whether individual frames should be resized.</p>
</div> </div>
</td> </td>
</tr> </tr>
@ -730,9 +849,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:FE4GifuPS_13GIFAnimatable19setFrameBufferCountFSiT_"></a> <a name="/s:4Gifu13GIFAnimatablePAAE19setFrameBufferCountySiF"></a>
<a name="//apple_ref/swift/Method/setFrameBufferCount(_:)" class="dashAnchor"></a> <a name="//apple_ref/swift/Method/setFrameBufferCount(_:)" class="dashAnchor"></a>
<a class="token" href="#/s:FE4GifuPS_13GIFAnimatable19setFrameBufferCountFSiT_">setFrameBufferCount(_:)</a> <a class="token" href="#/s:4Gifu13GIFAnimatablePAAE19setFrameBufferCountySiF">setFrameBufferCount(_:)</a>
</code> </code>
<span class="declaration-note"> <span class="declaration-note">
Extension method Extension method
@ -767,7 +886,6 @@
<td> <td>
<div> <div>
<p>The number of frames to buffer.</p> <p>The number of frames to buffer.</p>
</div> </div>
</td> </td>
</tr> </tr>
@ -780,9 +898,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:FE4GifuPS_13GIFAnimatable19updateImageIfNeededFT_T_"></a> <a name="/s:4Gifu13GIFAnimatablePAAE19updateImageIfNeededyyF"></a>
<a name="//apple_ref/swift/Method/updateImageIfNeeded()" class="dashAnchor"></a> <a name="//apple_ref/swift/Method/updateImageIfNeeded()" class="dashAnchor"></a>
<a class="token" href="#/s:FE4GifuPS_13GIFAnimatable19updateImageIfNeededFT_T_">updateImageIfNeeded()</a> <a class="token" href="#/s:4Gifu13GIFAnimatablePAAE19updateImageIfNeededyyF">updateImageIfNeeded()</a>
</code> </code>
<span class="declaration-note"> <span class="declaration-note">
Extension method Extension method
@ -813,7 +931,7 @@
</section> </section>
<section id="footer"> <section id="footer">
<p>2015 © Reda Lemeden. See LICENSE for more details.</p> <p>2015 © Reda Lemeden. See LICENSE for more details.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p> <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section> </section>
</article> </article>
</div> </div>

View File

@ -72,9 +72,9 @@
<li class="item"> <li class="item">
<div> <div>
<code> <code>
<a name="/s:vP4Gifu14ImageContainer5imageGSqCSo7UIImage_"></a> <a name="/s:4Gifu14ImageContainerP5imageSo7UIImageCSgv"></a>
<a name="//apple_ref/swift/Property/image" class="dashAnchor"></a> <a name="//apple_ref/swift/Property/image" class="dashAnchor"></a>
<a class="token" href="#/s:vP4Gifu14ImageContainer5imageGSqCSo7UIImage_">image</a> <a class="token" href="#/s:4Gifu14ImageContainerP5imageSo7UIImageCSgv">image</a>
</code> </code>
</div> </div>
<div class="height-container"> <div class="height-container">
@ -102,7 +102,7 @@
</section> </section>
<section id="footer"> <section id="footer">
<p>2015 © Reda Lemeden. See LICENSE for more details.</p> <p>2015 © Reda Lemeden. See LICENSE for more details.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p> <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section> </section>
</article> </article>
</div> </div>

View File

@ -164,6 +164,11 @@ header {
padding-top: 10px; } padding-top: 10px; }
.main-content section .task-group-section .task-group:first-of-type .section-name { .main-content section .task-group-section .task-group:first-of-type .section-name {
padding-top: 15px; } padding-top: 15px; }
.main-content section .heading:before {
content: "";
display: block;
padding-top: 70px;
margin: -70px 0 0; }
.section { .section {
padding: 0 25px; } padding: 0 25px; }

View File

@ -56,15 +56,15 @@
<section> <section>
<section class="section"> <section class="section">
<a href='#img-src-https-github-com-kaishin-gifu-raw-master-header-gif-alt-logo' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h1 id='img-src-https-github-com-kaishin-gifu-raw-master-header-gif-alt-logo'><img src="https://github.com/kaishin/Gifu/raw/master/header.gif" alt="Logo"></h1> <h1 id='img-src-https-github-com-kaishin-gifu-raw-master-header-gif-alt-logo' class='heading'><img src="https://github.com/kaishin/Gifu/raw/master/header.gif" alt="Logo"></h1>
<p><a href="https://github.com/kaishin/Gifu/releases/latest"><img src="https://img.shields.io/github/release/kaishin/Gifu.svg?maxAge=2592000" alt="GitHub release"></a> <img src="https://www.bitrise.io/app/a0eae2c9b6aa754c.svg?token=dDlRyPi2aOlZnvbl4kL8Kw&amp;branch=master" alt="Bitrise"> <a href="https://github.com/Carthage/Carthage"><img src="https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat" alt="Carthage compatible"></a> <a href="https://gitter.im/kaishin/gifu"><img src="https://badges.gitter.im/kaishin/gifu.svg" alt="Join the chat at https://gitter.im/kaishin/gifu"></a> <img src="https://img.shields.io/badge/Swift-3.0.x-orange.svg" alt="Swift 3.0.x"> <img src="https://img.shields.io/badge/platforms-iOS-lightgrey.svg" alt="platforms"></p> <p><a href="https://github.com/kaishin/Gifu/releases/latest"><img src="https://img.shields.io/github/release/kaishin/Gifu.svg" alt="GitHub release"></a> <img src="https://www.bitrise.io/app/a0eae2c9b6aa754c.svg?token=dDlRyPi2aOlZnvbl4kL8Kw&branch=master" alt="Bitrise"> <a href="https://github.com/Carthage/Carthage"><img src="https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat" alt="Carthage compatible"></a> <a href="https://gitter.im/kaishin/gifu"><img src="https://badges.gitter.im/kaishin/gifu.svg" alt="Join the chat at https://gitter.im/kaishin/gifu"></a> <img src="https://img.shields.io/badge/Swift-3.0.x-orange.svg" alt="Swift 3.0.x"> <img src="https://img.shields.io/badge/platforms-iOS-lightgrey.svg" alt="platforms"></p>
<p>Gifu adds protocol-based, performance-aware animated GIF support to UIKit. (It&rsquo;s also a <a href="https://goo.gl/maps/CCeAc">prefecture in Japan</a>).</p> <p>Gifu adds protocol-based, performance-aware animated GIF support to UIKit. (It&rsquo;s also a <a href="https://goo.gl/maps/CCeAc">prefecture in Japan</a>).</p>
<p><strong>Swift 2.3</strong> support is on the <a href="https://github.com/kaishin/Gifu/tree/swift2.3">swift2.3</a> branch which will not be getting any future updates.</p> <p>The <code>master</code> branch works with Xcode 9 and iOS 11, which are both in beta. Use <code>v2.0</code> for the stable version.</p>
<a href='#install' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='install'>Install</h2> <h2 id='install' class='heading'>Install</h2>
<a href='#a-href-https-github-com-carthage-carthage-carthage-a' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h3 id='a-href-https-github-com-carthage-carthage-carthage-a'><a href="https://github.com/Carthage/Carthage">Carthage</a></h3> <h3 id='a-href-https-github-com-carthage-carthage-carthage-a' class='heading'><a href="https://github.com/Carthage/Carthage">Carthage</a></h3>
<ul> <ul>
<li>Add the following to your Cartfile: <code>github &quot;kaishin/Gifu&quot;</code></li> <li>Add the following to your Cartfile: <code>github &quot;kaishin/Gifu&quot;</code></li>
@ -72,34 +72,34 @@
<li>Follow the current instructions in <a href="https://github.com/Carthage/Carthage#adding-frameworks-to-an-application">Carthage&rsquo;s README</a> <li>Follow the current instructions in <a href="https://github.com/Carthage/Carthage#adding-frameworks-to-an-application">Carthage&rsquo;s README</a>
for up to date installation instructions.</li> for up to date installation instructions.</li>
</ul> </ul>
<a href='#a-href-http-cocoapods-org-cocoapods-a' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h3 id='a-href-http-cocoapods-org-cocoapods-a'><a href="http://cocoapods.org">CocoaPods</a></h3> <h3 id='a-href-http-cocoapods-org-cocoapods-a' class='heading'><a href="http://cocoapods.org">CocoaPods</a></h3>
<ul> <ul>
<li>Add the following to your <a href="http://guides.cocoapods.org/using/the-podfile.html">Podfile</a>: <code>pod &#39;Gifu&#39;</code></li> <li>Add the following to your <a href="http://guides.cocoapods.org/using/the-podfile.html">Podfile</a>: <code>pod &#39;Gifu&#39;</code></li>
<li>You will also need to make sure you&rsquo;re opting into using frameworks: <code>use_frameworks!</code></li> <li>You will also need to make sure you&rsquo;re opting into using frameworks: <code>use_frameworks!</code></li>
<li>Then run <code>pod install</code> with CocoaPods 0.36 or newer.</li> <li>Then run <code>pod install</code> with CocoaPods 0.36 or newer.</li>
</ul> </ul>
<a href='#how-it-works' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='how-it-works'>How It Works</h2> <h2 id='how-it-works' class='heading'>How It Works</h2>
<p><code>Gifu</code> does not require using the built-in <code>GIFImageView</code> subclass. The <code>Animator</code> class does the heavy-lifting, while the <code>GIFAnimatable</code> protocol exposes the functionality to the view classes that conform to it, using protocol extensions.</p> <p><code>Gifu</code> does not require using the built-in <code><a href="Classes/GIFImageView.html">GIFImageView</a></code> subclass. The <code><a href="Classes/Animator.html">Animator</a></code> class does the heavy-lifting, while the <code><a href="Protocols/GIFAnimatable.html">GIFAnimatable</a></code> protocol exposes the functionality to the view classes that conform to it, using protocol extensions.</p>
<p>The <code>Animator</code> has a <code>FrameStore</code> that only keeps a limited number of frames in-memory, effectively creating a buffer for the animation without consuming all the available memory. This approach makes loading large GIFs a lot more resource-friendly.</p> <p>The <code><a href="Classes/Animator.html">Animator</a></code> has a <code>FrameStore</code> that only keeps a limited number of frames in-memory, effectively creating a buffer for the animation without consuming all the available memory. This approach makes loading large GIFs a lot more resource-friendly.</p>
<p>The figure below summarizes how this works in practice. Given an image <p>The figure below summarizes how this works in practice. Given an image
containing 10 frames, Gifu will load the current frame (red), buffer the next two frames in this example (orange), and empty up all the other frames to free up memory (gray):</p> containing 10 frames, Gifu will load the current frame (red), buffer the next two frames in this example (orange), and empty up all the other frames to free up memory (gray):</p>
<p><img src="https://db.tt/ZLfx23hg" width="300" /></p> <p><img src="https://github.com/kaishin/Gifu/raw/master/gifu-figure.gif" width="300" /></p>
<a href='#usage' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='usage'>Usage</h2> <h2 id='usage' class='heading'>Usage</h2>
<p>There are two options that should cover any situation:</p> <p>There are two options that should cover any situation:</p>
<ul> <ul>
<li>Use the built-in <code>GIFImageView</code> subclass if you don&rsquo;t need to combine GIF support with another image library.</li> <li>Use the built-in <code><a href="Classes/GIFImageView.html">GIFImageView</a></code> subclass if you don&rsquo;t need to combine GIF support with another image library.</li>
<li>If you need more flexibility and composability, make your class conform to <code>GIFAnimatable</code>. In practice, any <code>UIView</code> subclass would do, since you get most of the required properties for free. For best results, make your <code>UIImageView</code> subclass conform to <code>GIFAnimatable</code> to get access to other features such as intrinsic content size.</li> <li>If you need more flexibility and composability, make your class conform to <code><a href="Protocols/GIFAnimatable.html">GIFAnimatable</a></code>. In practice, any <code>UIView</code> subclass would do, since you get most of the required properties for free. For best results, make your <code>UIImageView</code> subclass conform to <code><a href="Protocols/GIFAnimatable.html">GIFAnimatable</a></code> to get access to other features such as intrinsic content size.</li>
</ul> </ul>
<a href='#gifanimatable' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h3 id='gifanimatable'>GIFAnimatable</h3> <h3 id='gifanimatable' class='heading'>GIFAnimatable</h3>
<p>The bread and butter of Gifu. Through protocol extensions, <code>GIFAnimatable</code> exposes all the APIs of the library, and with very little boilerplate, any class can conform to it.</p> <p>The bread and butter of Gifu. Through protocol extensions, <code><a href="Protocols/GIFAnimatable.html">GIFAnimatable</a></code> exposes all the APIs of the library, and with very little boilerplate, any class can conform to it.</p>
<pre class="highlight swift"><code><span class="kd">class</span> <span class="kt">MyImageView</span><span class="p">:</span> <span class="kt">UIImageView</span><span class="p">,</span> <span class="kt">GIFAnimatable</span> <span class="p">{</span> <pre class="highlight swift"><code><span class="kd">class</span> <span class="kt">MyImageView</span><span class="p">:</span> <span class="kt">UIImageView</span><span class="p">,</span> <span class="kt">GIFAnimatable</span> <span class="p">{</span>
<span class="kd">public</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">animator</span><span class="p">:</span> <span class="kt">Animator</span><span class="p">?</span> <span class="o">=</span> <span class="p">{</span> <span class="kd">public</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">animator</span><span class="p">:</span> <span class="kt">Animator</span><span class="p">?</span> <span class="o">=</span> <span class="p">{</span>
<span class="k">return</span> <span class="kt">Animator</span><span class="p">(</span><span class="nv">withDelegate</span><span class="p">:</span> <span class="k">self</span><span class="p">)</span> <span class="k">return</span> <span class="kt">Animator</span><span class="p">(</span><span class="nv">withDelegate</span><span class="p">:</span> <span class="k">self</span><span class="p">)</span>
@ -164,9 +164,9 @@ containing 10 frames, Gifu will load the current frame (red), buffer the next tw
<span class="p">}</span> <span class="p">}</span>
<span class="p">}</span> <span class="p">}</span>
</code></pre> </code></pre>
<a href='#examples' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h3 id='examples'>Examples</h3> <h3 id='examples' class='heading'>Examples</h3>
<p>The simplest way to get started is initializing a <code>GIFAnimatable</code> class in code or in a storyboard, then calling <code>animate(:)</code> on it.</p> <p>The simplest way to get started is initializing a <code><a href="Protocols/GIFAnimatable.html">GIFAnimatable</a></code> class in code or in a storyboard, then calling <code>animate(:)</code> on it.</p>
<pre class="highlight swift"><code><span class="k">let</span> <span class="nv">imageView</span> <span class="o">=</span> <span class="kt">GIFImageView</span><span class="p">(</span><span class="nv">frame</span><span class="p">:</span> <span class="kt">CGRect</span><span class="p">(</span><span class="nv">x</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> <span class="nv">y</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> <span class="nv">width</span><span class="p">:</span> <span class="mi">200</span><span class="p">,</span> <span class="nv">height</span><span class="p">:</span> <span class="mi">100</span><span class="p">))</span> <pre class="highlight swift"><code><span class="k">let</span> <span class="nv">imageView</span> <span class="o">=</span> <span class="kt">GIFImageView</span><span class="p">(</span><span class="nv">frame</span><span class="p">:</span> <span class="kt">CGRect</span><span class="p">(</span><span class="nv">x</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> <span class="nv">y</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> <span class="nv">width</span><span class="p">:</span> <span class="mi">200</span><span class="p">,</span> <span class="nv">height</span><span class="p">:</span> <span class="mi">100</span><span class="p">))</span>
<span class="n">imageView</span><span class="o">.</span><span class="nf">animate</span><span class="p">(</span><span class="nv">withGIFNamed</span><span class="p">:</span> <span class="s">"mugen"</span><span class="p">)</span> <span class="n">imageView</span><span class="o">.</span><span class="nf">animate</span><span class="p">(</span><span class="nv">withGIFNamed</span><span class="p">:</span> <span class="s">"mugen"</span><span class="p">)</span>
</code></pre> </code></pre>
@ -188,26 +188,26 @@ containing 10 frames, Gifu will load the current frame (red), buffer the next tw
<span class="p">}</span> <span class="p">}</span>
</code></pre> </code></pre>
<p>If you are using a <code>GIFAnimatable</code> class in a table or collection view, you can call the <code>prepareForReuse()</code> method in your cell subclass:</p> <p>If you are using a <code><a href="Protocols/GIFAnimatable.html">GIFAnimatable</a></code> class in a table or collection view, you can call the <code>prepareForReuse()</code> method in your cell subclass:</p>
<pre class="highlight swift"><code><span class="k">override</span> <span class="kd">func</span> <span class="nf">prepareForReuse</span><span class="p">()</span> <span class="p">{</span> <pre class="highlight swift"><code><span class="k">override</span> <span class="kd">func</span> <span class="nf">prepareForReuse</span><span class="p">()</span> <span class="p">{</span>
<span class="k">super</span><span class="o">.</span><span class="nf">prepareForReuse</span><span class="p">()</span> <span class="k">super</span><span class="o">.</span><span class="nf">prepareForReuse</span><span class="p">()</span>
<span class="n">imageView</span><span class="o">.</span><span class="nf">prepareForReuse</span><span class="p">()</span> <span class="n">imageView</span><span class="o">.</span><span class="nf">prepareForReuse</span><span class="p">()</span>
<span class="p">}</span> <span class="p">}</span>
</code></pre> </code></pre>
<a href='#demo-app' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h3 id='demo-app'>Demo App</h3> <h3 id='demo-app' class='heading'>Demo App</h3>
<p>Clone or download the repository and open <code>Gifu.xcworkspace</code> to check out the demo app.</p> <p>Clone or download the repository and open <code>Gifu.xcworkspace</code> to check out the demo app.</p>
<a href='#documentation' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='documentation'>Documentation</h2> <h2 id='documentation' class='heading'>Documentation</h2>
<p>See the <a href="http://kaishin.github.io/Gifu/">full API documentation</a>.</p> <p>See the <a href="http://kaishin.github.io/Gifu/">full API documentation</a>.</p>
<a href='#compatibility' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='compatibility'>Compatibility</h2> <h2 id='compatibility' class='heading'>Compatibility</h2>
<ul> <ul>
<li>iOS 9.0+</li> <li>iOS 9.0+</li>
<li>Swift 3.0</li> <li>Swift 3.0</li>
<li>Xcode 8.0</li> <li>Xcode 8.0</li>
</ul> </ul>
<a href='#license' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='license'>License</h2> <h2 id='license' class='heading'>License</h2>
<p>See LICENSE.</p> <p>See LICENSE.</p>
@ -215,7 +215,7 @@ containing 10 frames, Gifu will load the current frame (red), buffer the next tw
</section> </section>
<section id="footer"> <section id="footer">
<p>2015 © Reda Lemeden. See LICENSE for more details.</p> <p>2015 © Reda Lemeden. See LICENSE for more details.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p> <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section> </section>
</article> </article>
</div> </div>

View File

@ -38,3 +38,9 @@ $(".token").click(function(event) {
} }
event.preventDefault(); event.preventDefault();
}); });
// Dumb down quotes within code blocks that delimit strings instead of quotations
// https://github.com/realm/jazzy/issues/714
$("code q").replaceWith(function () {
return ["\"", $(this).contents(), "\""];
});

File diff suppressed because one or more lines are too long

View File

@ -1,6 +0,0 @@
{
"warnings": [
],
"source_directory": "/Users/kaishin/Developer/Frameworks/Gifu"
}

Binary file not shown.

View File

@ -56,15 +56,15 @@
<section> <section>
<section class="section"> <section class="section">
<a href='#img-src-https-github-com-kaishin-gifu-raw-master-header-gif-alt-logo' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h1 id='img-src-https-github-com-kaishin-gifu-raw-master-header-gif-alt-logo'><img src="https://github.com/kaishin/Gifu/raw/master/header.gif" alt="Logo"></h1> <h1 id='img-src-https-github-com-kaishin-gifu-raw-master-header-gif-alt-logo' class='heading'><img src="https://github.com/kaishin/Gifu/raw/master/header.gif" alt="Logo"></h1>
<p><a href="https://github.com/kaishin/Gifu/releases/latest"><img src="https://img.shields.io/github/release/kaishin/Gifu.svg?maxAge=2592000" alt="GitHub release"></a> <img src="https://www.bitrise.io/app/a0eae2c9b6aa754c.svg?token=dDlRyPi2aOlZnvbl4kL8Kw&amp;branch=master" alt="Bitrise"> <a href="https://github.com/Carthage/Carthage"><img src="https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat" alt="Carthage compatible"></a> <a href="https://gitter.im/kaishin/gifu"><img src="https://badges.gitter.im/kaishin/gifu.svg" alt="Join the chat at https://gitter.im/kaishin/gifu"></a> <img src="https://img.shields.io/badge/Swift-3.0.x-orange.svg" alt="Swift 3.0.x"> <img src="https://img.shields.io/badge/platforms-iOS-lightgrey.svg" alt="platforms"></p> <p><a href="https://github.com/kaishin/Gifu/releases/latest"><img src="https://img.shields.io/github/release/kaishin/Gifu.svg" alt="GitHub release"></a> <img src="https://www.bitrise.io/app/a0eae2c9b6aa754c.svg?token=dDlRyPi2aOlZnvbl4kL8Kw&branch=master" alt="Bitrise"> <a href="https://github.com/Carthage/Carthage"><img src="https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat" alt="Carthage compatible"></a> <a href="https://gitter.im/kaishin/gifu"><img src="https://badges.gitter.im/kaishin/gifu.svg" alt="Join the chat at https://gitter.im/kaishin/gifu"></a> <img src="https://img.shields.io/badge/Swift-3.0.x-orange.svg" alt="Swift 3.0.x"> <img src="https://img.shields.io/badge/platforms-iOS-lightgrey.svg" alt="platforms"></p>
<p>Gifu adds protocol-based, performance-aware animated GIF support to UIKit. (It&rsquo;s also a <a href="https://goo.gl/maps/CCeAc">prefecture in Japan</a>).</p> <p>Gifu adds protocol-based, performance-aware animated GIF support to UIKit. (It&rsquo;s also a <a href="https://goo.gl/maps/CCeAc">prefecture in Japan</a>).</p>
<p><strong>Swift 2.3</strong> support is on the <a href="https://github.com/kaishin/Gifu/tree/swift2.3">swift2.3</a> branch which will not be getting any future updates.</p> <p>The <code>master</code> branch works with Xcode 9 and iOS 11, which are both in beta. Use <code>v2.0</code> for the stable version.</p>
<a href='#install' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='install'>Install</h2> <h2 id='install' class='heading'>Install</h2>
<a href='#a-href-https-github-com-carthage-carthage-carthage-a' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h3 id='a-href-https-github-com-carthage-carthage-carthage-a'><a href="https://github.com/Carthage/Carthage">Carthage</a></h3> <h3 id='a-href-https-github-com-carthage-carthage-carthage-a' class='heading'><a href="https://github.com/Carthage/Carthage">Carthage</a></h3>
<ul> <ul>
<li>Add the following to your Cartfile: <code>github &quot;kaishin/Gifu&quot;</code></li> <li>Add the following to your Cartfile: <code>github &quot;kaishin/Gifu&quot;</code></li>
@ -72,34 +72,34 @@
<li>Follow the current instructions in <a href="https://github.com/Carthage/Carthage#adding-frameworks-to-an-application">Carthage&rsquo;s README</a> <li>Follow the current instructions in <a href="https://github.com/Carthage/Carthage#adding-frameworks-to-an-application">Carthage&rsquo;s README</a>
for up to date installation instructions.</li> for up to date installation instructions.</li>
</ul> </ul>
<a href='#a-href-http-cocoapods-org-cocoapods-a' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h3 id='a-href-http-cocoapods-org-cocoapods-a'><a href="http://cocoapods.org">CocoaPods</a></h3> <h3 id='a-href-http-cocoapods-org-cocoapods-a' class='heading'><a href="http://cocoapods.org">CocoaPods</a></h3>
<ul> <ul>
<li>Add the following to your <a href="http://guides.cocoapods.org/using/the-podfile.html">Podfile</a>: <code>pod &#39;Gifu&#39;</code></li> <li>Add the following to your <a href="http://guides.cocoapods.org/using/the-podfile.html">Podfile</a>: <code>pod &#39;Gifu&#39;</code></li>
<li>You will also need to make sure you&rsquo;re opting into using frameworks: <code>use_frameworks!</code></li> <li>You will also need to make sure you&rsquo;re opting into using frameworks: <code>use_frameworks!</code></li>
<li>Then run <code>pod install</code> with CocoaPods 0.36 or newer.</li> <li>Then run <code>pod install</code> with CocoaPods 0.36 or newer.</li>
</ul> </ul>
<a href='#how-it-works' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='how-it-works'>How It Works</h2> <h2 id='how-it-works' class='heading'>How It Works</h2>
<p><code>Gifu</code> does not require using the built-in <code>GIFImageView</code> subclass. The <code>Animator</code> class does the heavy-lifting, while the <code>GIFAnimatable</code> protocol exposes the functionality to the view classes that conform to it, using protocol extensions.</p> <p><code>Gifu</code> does not require using the built-in <code><a href="Classes/GIFImageView.html">GIFImageView</a></code> subclass. The <code><a href="Classes/Animator.html">Animator</a></code> class does the heavy-lifting, while the <code><a href="Protocols/GIFAnimatable.html">GIFAnimatable</a></code> protocol exposes the functionality to the view classes that conform to it, using protocol extensions.</p>
<p>The <code>Animator</code> has a <code>FrameStore</code> that only keeps a limited number of frames in-memory, effectively creating a buffer for the animation without consuming all the available memory. This approach makes loading large GIFs a lot more resource-friendly.</p> <p>The <code><a href="Classes/Animator.html">Animator</a></code> has a <code>FrameStore</code> that only keeps a limited number of frames in-memory, effectively creating a buffer for the animation without consuming all the available memory. This approach makes loading large GIFs a lot more resource-friendly.</p>
<p>The figure below summarizes how this works in practice. Given an image <p>The figure below summarizes how this works in practice. Given an image
containing 10 frames, Gifu will load the current frame (red), buffer the next two frames in this example (orange), and empty up all the other frames to free up memory (gray):</p> containing 10 frames, Gifu will load the current frame (red), buffer the next two frames in this example (orange), and empty up all the other frames to free up memory (gray):</p>
<p><img src="https://db.tt/ZLfx23hg" width="300" /></p> <p><img src="https://github.com/kaishin/Gifu/raw/master/gifu-figure.gif" width="300" /></p>
<a href='#usage' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='usage'>Usage</h2> <h2 id='usage' class='heading'>Usage</h2>
<p>There are two options that should cover any situation:</p> <p>There are two options that should cover any situation:</p>
<ul> <ul>
<li>Use the built-in <code>GIFImageView</code> subclass if you don&rsquo;t need to combine GIF support with another image library.</li> <li>Use the built-in <code><a href="Classes/GIFImageView.html">GIFImageView</a></code> subclass if you don&rsquo;t need to combine GIF support with another image library.</li>
<li>If you need more flexibility and composability, make your class conform to <code>GIFAnimatable</code>. In practice, any <code>UIView</code> subclass would do, since you get most of the required properties for free. For best results, make your <code>UIImageView</code> subclass conform to <code>GIFAnimatable</code> to get access to other features such as intrinsic content size.</li> <li>If you need more flexibility and composability, make your class conform to <code><a href="Protocols/GIFAnimatable.html">GIFAnimatable</a></code>. In practice, any <code>UIView</code> subclass would do, since you get most of the required properties for free. For best results, make your <code>UIImageView</code> subclass conform to <code><a href="Protocols/GIFAnimatable.html">GIFAnimatable</a></code> to get access to other features such as intrinsic content size.</li>
</ul> </ul>
<a href='#gifanimatable' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h3 id='gifanimatable'>GIFAnimatable</h3> <h3 id='gifanimatable' class='heading'>GIFAnimatable</h3>
<p>The bread and butter of Gifu. Through protocol extensions, <code>GIFAnimatable</code> exposes all the APIs of the library, and with very little boilerplate, any class can conform to it.</p> <p>The bread and butter of Gifu. Through protocol extensions, <code><a href="Protocols/GIFAnimatable.html">GIFAnimatable</a></code> exposes all the APIs of the library, and with very little boilerplate, any class can conform to it.</p>
<pre class="highlight swift"><code><span class="kd">class</span> <span class="kt">MyImageView</span><span class="p">:</span> <span class="kt">UIImageView</span><span class="p">,</span> <span class="kt">GIFAnimatable</span> <span class="p">{</span> <pre class="highlight swift"><code><span class="kd">class</span> <span class="kt">MyImageView</span><span class="p">:</span> <span class="kt">UIImageView</span><span class="p">,</span> <span class="kt">GIFAnimatable</span> <span class="p">{</span>
<span class="kd">public</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">animator</span><span class="p">:</span> <span class="kt">Animator</span><span class="p">?</span> <span class="o">=</span> <span class="p">{</span> <span class="kd">public</span> <span class="kd">lazy</span> <span class="k">var</span> <span class="nv">animator</span><span class="p">:</span> <span class="kt">Animator</span><span class="p">?</span> <span class="o">=</span> <span class="p">{</span>
<span class="k">return</span> <span class="kt">Animator</span><span class="p">(</span><span class="nv">withDelegate</span><span class="p">:</span> <span class="k">self</span><span class="p">)</span> <span class="k">return</span> <span class="kt">Animator</span><span class="p">(</span><span class="nv">withDelegate</span><span class="p">:</span> <span class="k">self</span><span class="p">)</span>
@ -164,9 +164,9 @@ containing 10 frames, Gifu will load the current frame (red), buffer the next tw
<span class="p">}</span> <span class="p">}</span>
<span class="p">}</span> <span class="p">}</span>
</code></pre> </code></pre>
<a href='#examples' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h3 id='examples'>Examples</h3> <h3 id='examples' class='heading'>Examples</h3>
<p>The simplest way to get started is initializing a <code>GIFAnimatable</code> class in code or in a storyboard, then calling <code>animate(:)</code> on it.</p> <p>The simplest way to get started is initializing a <code><a href="Protocols/GIFAnimatable.html">GIFAnimatable</a></code> class in code or in a storyboard, then calling <code>animate(:)</code> on it.</p>
<pre class="highlight swift"><code><span class="k">let</span> <span class="nv">imageView</span> <span class="o">=</span> <span class="kt">GIFImageView</span><span class="p">(</span><span class="nv">frame</span><span class="p">:</span> <span class="kt">CGRect</span><span class="p">(</span><span class="nv">x</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> <span class="nv">y</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> <span class="nv">width</span><span class="p">:</span> <span class="mi">200</span><span class="p">,</span> <span class="nv">height</span><span class="p">:</span> <span class="mi">100</span><span class="p">))</span> <pre class="highlight swift"><code><span class="k">let</span> <span class="nv">imageView</span> <span class="o">=</span> <span class="kt">GIFImageView</span><span class="p">(</span><span class="nv">frame</span><span class="p">:</span> <span class="kt">CGRect</span><span class="p">(</span><span class="nv">x</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> <span class="nv">y</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> <span class="nv">width</span><span class="p">:</span> <span class="mi">200</span><span class="p">,</span> <span class="nv">height</span><span class="p">:</span> <span class="mi">100</span><span class="p">))</span>
<span class="n">imageView</span><span class="o">.</span><span class="nf">animate</span><span class="p">(</span><span class="nv">withGIFNamed</span><span class="p">:</span> <span class="s">"mugen"</span><span class="p">)</span> <span class="n">imageView</span><span class="o">.</span><span class="nf">animate</span><span class="p">(</span><span class="nv">withGIFNamed</span><span class="p">:</span> <span class="s">"mugen"</span><span class="p">)</span>
</code></pre> </code></pre>
@ -188,26 +188,26 @@ containing 10 frames, Gifu will load the current frame (red), buffer the next tw
<span class="p">}</span> <span class="p">}</span>
</code></pre> </code></pre>
<p>If you are using a <code>GIFAnimatable</code> class in a table or collection view, you can call the <code>prepareForReuse()</code> method in your cell subclass:</p> <p>If you are using a <code><a href="Protocols/GIFAnimatable.html">GIFAnimatable</a></code> class in a table or collection view, you can call the <code>prepareForReuse()</code> method in your cell subclass:</p>
<pre class="highlight swift"><code><span class="k">override</span> <span class="kd">func</span> <span class="nf">prepareForReuse</span><span class="p">()</span> <span class="p">{</span> <pre class="highlight swift"><code><span class="k">override</span> <span class="kd">func</span> <span class="nf">prepareForReuse</span><span class="p">()</span> <span class="p">{</span>
<span class="k">super</span><span class="o">.</span><span class="nf">prepareForReuse</span><span class="p">()</span> <span class="k">super</span><span class="o">.</span><span class="nf">prepareForReuse</span><span class="p">()</span>
<span class="n">imageView</span><span class="o">.</span><span class="nf">prepareForReuse</span><span class="p">()</span> <span class="n">imageView</span><span class="o">.</span><span class="nf">prepareForReuse</span><span class="p">()</span>
<span class="p">}</span> <span class="p">}</span>
</code></pre> </code></pre>
<a href='#demo-app' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h3 id='demo-app'>Demo App</h3> <h3 id='demo-app' class='heading'>Demo App</h3>
<p>Clone or download the repository and open <code>Gifu.xcworkspace</code> to check out the demo app.</p> <p>Clone or download the repository and open <code>Gifu.xcworkspace</code> to check out the demo app.</p>
<a href='#documentation' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='documentation'>Documentation</h2> <h2 id='documentation' class='heading'>Documentation</h2>
<p>See the <a href="http://kaishin.github.io/Gifu/">full API documentation</a>.</p> <p>See the <a href="http://kaishin.github.io/Gifu/">full API documentation</a>.</p>
<a href='#compatibility' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='compatibility'>Compatibility</h2> <h2 id='compatibility' class='heading'>Compatibility</h2>
<ul> <ul>
<li>iOS 9.0+</li> <li>iOS 9.0+</li>
<li>Swift 3.0</li> <li>Swift 3.0</li>
<li>Xcode 8.0</li> <li>Xcode 8.0</li>
</ul> </ul>
<a href='#license' class='anchor' aria-hidden=true><span class="header-anchor"></span></a><h2 id='license'>License</h2> <h2 id='license' class='heading'>License</h2>
<p>See LICENSE.</p> <p>See LICENSE.</p>
@ -215,7 +215,7 @@ containing 10 frames, Gifu will load the current frame (red), buffer the next tw
</section> </section>
<section id="footer"> <section id="footer">
<p>2015 © Reda Lemeden. See LICENSE for more details.</p> <p>2015 © Reda Lemeden. See LICENSE for more details.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p> <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.0</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section> </section>
</article> </article>
</div> </div>

View File

@ -38,3 +38,9 @@ $(".token").click(function(event) {
} }
event.preventDefault(); event.preventDefault();
}); });
// Dumb down quotes within code blocks that delimit strings instead of quotations
// https://github.com/realm/jazzy/issues/714
$("code q").replaceWith(function () {
return ["\"", $(this).contents(), "\""];
});

1
docs/search.json Normal file

File diff suppressed because one or more lines are too long