Skip to content

Commit

Permalink
Update jazzy
Browse files Browse the repository at this point in the history
  • Loading branch information
ra1028 committed May 13, 2019
1 parent 33b01f1 commit 9b2075e
Showing 1 changed file with 33 additions and 14 deletions.
47 changes: 33 additions & 14 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@ <H4 align="center">
<a href="https://github.com/ra1028/Carbon/blob/master/LICENSE"><img alt="Lincense" src="https://img.shields.io/badge/License-Apache%202.0-black.svg"/></a>
</p>

<p align="center">
Made with ❤️ by <a href="https://github.com/ra1028">Ryo Aoyama</a>
</p>

<hr>

<table><thead>
Expand All @@ -227,10 +231,6 @@ <H4 align="center">
</tr>
</tbody></table>

<p align="right">
Made with ❤️ by <a href="https://github.com/ra1028">Ryo Aoyama</a>
</p>

<hr>
<h2 id='introduction' class='heading'>Introduction</h2>

Expand All @@ -240,7 +240,7 @@ <h2 id='introduction' class='heading'>Introduction</h2>
<p>Uses <a href="https://github.com/ra1028/DifferenceKit">DifferenceKit</a> which is highly optimized based on Paul Heckel&rsquo;s paper for diffing.<br>
Declarative design and diffing algorithm make your code more predictable, debugging easier and providing beautiful animations to users. </p>

<p>Our goal is similar to <a href="https://github.com/Instagram/IGListKit">IGListKit</a> and <a href="https://github.com/airbnb/epoxy">Epoxy</a>, we respect those library as pioneers. </p>
<p>Our goal is similar to <a href="https://github.com/Instagram/IGListKit">Instagram/IGListKit</a> and <a href="https://github.com/airbnb/epoxy">airbnb/Epoxy</a>, we respect those library as pioneers. </p>

<hr>
<h2 id='examples' class='heading'>Examples</h2>
Expand Down Expand Up @@ -333,7 +333,7 @@ <h4 id='cellnode' class='heading'>CellNode</h4>

<p><code><a href="Structs/CellNode.html">CellNode</a></code> is a node representing cell.<br>
Unlike in the ViewNode, this needs an <code>id</code> which <code>Hashable</code> type to identify from among a lot of cells.<br>
The <code>id</code> is used to find the same component in the list data before and after changed, then calculate the following kind of diff. </p>
The <code>id</code> is used to find the same component in the list data before and after changed, then calculate the all kind of diff. </p>

<ul>
<li>deletes</li>
Expand All @@ -351,7 +351,7 @@ <h4 id='section' class='heading'>Section</h4>

<p><code><a href="Structs/Section.html">Section</a></code> has a header, a footer and a group of cells.<br>
A group of cells can be contains nil, then skipped rendering of it cell.<br>
This also needs to specify <code>id</code> for identify from among multiple sections, then can be calculate the several kind of diff. </p>
This also needs to specify <code>id</code> for identify from among multiple sections, then can be calculate the all kind of diff. </p>

<ul>
<li>section deletes</li>
Expand Down Expand Up @@ -435,6 +435,10 @@ <h4 id='renderer' class='heading'>Renderer</h4>
<span class="p">)</span>
</code></pre>

<H3 align="center">
<a href="https://ra1028.github.io/Carbon">[See More Usage]</a>
</H3>

<hr>
<h2 id='advanced-guide' class='heading'>Advanced Guide</h2>
<h4 id='custom-content' class='heading'>Custom Content</h4>
Expand Down Expand Up @@ -559,13 +563,32 @@ <h4 id='component-in-depth' class='heading'>Component in-Depth</h4>
<p><a href="https://ra1028.github.io/Carbon/Protocols/Component.html">See more</a></p>
<h4 id='adapter-customization' class='heading'>Adapter Customization</h4>

<p>You can add methods of <code>Delegate</code>, <code>DataSource</code> by inheriting each adapter.<br>
Furthermore, it can be customized the class of the elements(cell/header/footer) which becomes the container of component by setting it to <code>config</code>. </p>
<p>You can add methods of <code>delegate</code>, <code>dataSource</code> by subclassing each adapter. </p>
<pre class="highlight swift"><code><span class="kd">class</span> <span class="kt">CustomTableViewdapter</span><span class="p">:</span> <span class="kt">UITableViewAdapter</span> <span class="p">{</span>
<span class="kd">func</span> <span class="nf">tableView</span><span class="p">(</span><span class="n">_</span> <span class="nv">tableView</span><span class="p">:</span> <span class="kt">UITableView</span><span class="p">,</span> <span class="n">titleForHeaderInSection</span> <span class="nv">section</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">String</span><span class="p">?</span> <span class="p">{</span>
<span class="k">return</span> <span class="s">"Header title for section</span><span class="se">\(</span><span class="n">section</span><span class="se">)</span><span class="s">"</span>
<span class="p">}</span>
<span class="p">}</span>

<span class="k">let</span> <span class="nv">renderer</span> <span class="o">=</span> <span class="kt">Renderer</span><span class="p">(</span>
<span class="nv">adapter</span><span class="p">:</span> <span class="kt">CustomTableViewdapter</span><span class="p">(),</span>
<span class="nv">updater</span><span class="p">:</span> <span class="kt">UITableViewUpdater</span><span class="p">()</span>
<span class="p">)</span>
</code></pre>

<p>Furthermore, it can be customized the class of the elements(cell/header/footer) which becomes the container of component by setting it to <code>config</code>. </p>

<ul>
<li><strong>config</strong><br>
The configuration which having the classes of elements. It can be specified only when adapter is initialized.<br></li>
</ul>
<pre class="highlight swift"><code><span class="k">let</span> <span class="nv">config</span> <span class="o">=</span> <span class="kt">UITableViewAdapter</span><span class="o">.</span><span class="kt">Config</span><span class="p">(</span>
<span class="nv">cellClass</span><span class="p">:</span> <span class="kt">CustomCell</span><span class="o">.</span><span class="k">self</span><span class="p">,</span>
<span class="nv">headerViewClass</span><span class="p">:</span> <span class="kt">CustomHeaderView</span><span class="o">.</span><span class="k">self</span><span class="p">,</span>
<span class="nv">footerViewClass</span><span class="p">:</span> <span class="kt">CustomFooterView</span><span class="o">.</span><span class="k">self</span>
<span class="p">)</span>
<span class="k">let</span> <span class="nv">adapter</span> <span class="o">=</span> <span class="kt">UITableViewAdapter</span><span class="p">(</span><span class="nv">config</span><span class="p">:</span> <span class="n">config</span><span class="p">)</span>
</code></pre>

<p><a href="https://ra1028.github.io/Carbon/Adapters.html">See more</a></p>
<h4 id='updater-customization' class='heading'>Updater Customization</h4>
Expand Down Expand Up @@ -627,11 +650,7 @@ <h2 id='installation' class='heading'>Installation</h2>
<h3 id='a-href-https-cocoapods-org-cocoapods-a' class='heading'><a href="https://cocoapods.org">CocoaPods</a></h3>

<p>Add the following to your <code>Podfile</code>:</p>
<pre class="highlight ruby"><code><span class="n">use_frameworks!</span>

<span class="n">target</span> <span class="s1">'TargetName'</span> <span class="k">do</span>
<span class="n">pod</span> <span class="s1">'Carbon'</span>
<span class="k">end</span>
<pre class="highlight ruby"><code><span class="n">pod</span> <span class="s1">'Carbon'</span>
</code></pre>
<h3 id='a-href-https-github-com-carthage-carthage-carthage-a' class='heading'><a href="https://github.com/Carthage/Carthage">Carthage</a></h3>

Expand Down

0 comments on commit 9b2075e

Please sign in to comment.