Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Commit

Permalink
[Docs] update, re-gen for 7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jessesquires committed Jan 1, 2018
1 parent 7928f44 commit 25ee7e2
Show file tree
Hide file tree
Showing 24 changed files with 114 additions and 487 deletions.
16 changes: 8 additions & 8 deletions Guides/Getting Started.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ This library has four primary components:

1. `Section` — represents a section of data
2. `DataSource` — represents a collection of `Section` types
3. `ReusableViewFactory` — responsible for dequeuing and configuring cells (for `UITableView` or `UICollectionView`)
4. `DataSourceProvider` — owns a data source and cell factory, and provides a `UICollectionViewDataSource` or `UITableViewDataSource` object.
3. `ReusableViewConfig` — responsible for dequeuing and configuring cells (for `UITableView` or `UICollectionView`)
4. `DataSourceProvider` — owns a data source and view config, and provides a `UICollectionViewDataSource` or `UITableViewDataSource` object.

## Example

Expand All @@ -28,23 +28,23 @@ let section1 = Section(items: ...)
let section2 = Section(items: ...)
let dataSource = DataSource(sections: section0, section1, section2)

// 2. create cell factory
let cellFactory = ViewFactory(reuseIdentifier: "CellId") { (cell, model?, type, collectionView, indexPath) -> MyCellClass in
// 2. create cell config
let cellConfig = ReusableViewConfig(reuseIdentifier: "CellId") { (cell, model?, type, collectionView, indexPath) -> MyCellClass in
// configure the cell with the model
return cell
}

// 3. create supplementary view factory
// 3. create supplementary view config
let type = ReusableViewType.supplementaryView(kind: UICollectionElementKindSectionHeader)
let headerFactory = ViewFactory(reuseIdentifier: "HeaderId", type: type) { (view, model?, type, collectionView, indexPath) -> MyHeaderView in
let headerConfig = ReusableViewConfig(reuseIdentifier: "HeaderId", type: type) { (view, model?, type, collectionView, indexPath) -> MyHeaderView in
// configure header view
return view
}

// 4. create data source provider
let dataSourceProvider = DataSourceProvider(dataSource: dataSource,
cellFactory: cellFactory,
supplementaryFactory: headerFactory)
cellConfig: cellConfig,
supplementaryConfig: headerConfig)

// 5. set the collection view's data source
collectionView.dataSource = dataSourceProvider.collectionViewDataSource
Expand Down
5 changes: 1 addition & 4 deletions docs/Classes.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@
<li class="nav-group-task">
<a href="Protocols/ReusableViewProtocol.html">ReusableViewProtocol</a>
</li>
<li class="nav-group-task">
<a href="Protocols/SectionInfoProtocol.html">SectionInfoProtocol</a>
</li>
</ul>
</li>
<li class="nav-group-name">
Expand Down Expand Up @@ -246,7 +243,7 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2017 <a class="link" href="https://twitter.com/jesse_squires" target="_blank" rel="external">Jesse Squires</a>. All rights reserved. (Last updated: 2017-12-31)</p>
<p>&copy; 2018 <a class="link" href="https://twitter.com/jesse_squires" target="_blank" rel="external">Jesse Squires</a>. All rights reserved. (Last updated: 2018-01-01)</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>
</article>
Expand Down
5 changes: 1 addition & 4 deletions docs/Classes/DataSourceProvider.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@
<li class="nav-group-task">
<a href="../Protocols/ReusableViewProtocol.html">ReusableViewProtocol</a>
</li>
<li class="nav-group-task">
<a href="../Protocols/SectionInfoProtocol.html">SectionInfoProtocol</a>
</li>
</ul>
</li>
<li class="nav-group-name">
Expand Down Expand Up @@ -477,7 +474,7 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2017 <a class="link" href="https://twitter.com/jesse_squires" target="_blank" rel="external">Jesse Squires</a>. All rights reserved. (Last updated: 2017-12-31)</p>
<p>&copy; 2018 <a class="link" href="https://twitter.com/jesse_squires" target="_blank" rel="external">Jesse Squires</a>. All rights reserved. (Last updated: 2018-01-01)</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>
</article>
Expand Down
5 changes: 1 addition & 4 deletions docs/Classes/FetchedResultsController.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@
<li class="nav-group-task">
<a href="../Protocols/ReusableViewProtocol.html">ReusableViewProtocol</a>
</li>
<li class="nav-group-task">
<a href="../Protocols/SectionInfoProtocol.html">SectionInfoProtocol</a>
</li>
</ul>
</li>
<li class="nav-group-name">
Expand Down Expand Up @@ -262,7 +259,7 @@ <h4>Return Value</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2017 <a class="link" href="https://twitter.com/jesse_squires" target="_blank" rel="external">Jesse Squires</a>. All rights reserved. (Last updated: 2017-12-31)</p>
<p>&copy; 2018 <a class="link" href="https://twitter.com/jesse_squires" target="_blank" rel="external">Jesse Squires</a>. All rights reserved. (Last updated: 2018-01-01)</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>
</article>
Expand Down
5 changes: 1 addition & 4 deletions docs/Classes/FetchedResultsDelegateProvider.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@
<li class="nav-group-task">
<a href="../Protocols/ReusableViewProtocol.html">ReusableViewProtocol</a>
</li>
<li class="nav-group-task">
<a href="../Protocols/SectionInfoProtocol.html">SectionInfoProtocol</a>
</li>
</ul>
</li>
<li class="nav-group-name">
Expand Down Expand Up @@ -415,7 +412,7 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2017 <a class="link" href="https://twitter.com/jesse_squires" target="_blank" rel="external">Jesse Squires</a>. All rights reserved. (Last updated: 2017-12-31)</p>
<p>&copy; 2018 <a class="link" href="https://twitter.com/jesse_squires" target="_blank" rel="external">Jesse Squires</a>. All rights reserved. (Last updated: 2018-01-01)</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>
</article>
Expand Down
5 changes: 1 addition & 4 deletions docs/Classes/TitledSupplementaryView.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@
<li class="nav-group-task">
<a href="../Protocols/ReusableViewProtocol.html">ReusableViewProtocol</a>
</li>
<li class="nav-group-task">
<a href="../Protocols/SectionInfoProtocol.html">SectionInfoProtocol</a>
</li>
</ul>
</li>
<li class="nav-group-name">
Expand Down Expand Up @@ -252,7 +249,7 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2017 <a class="link" href="https://twitter.com/jesse_squires" target="_blank" rel="external">Jesse Squires</a>. All rights reserved. (Last updated: 2017-12-31)</p>
<p>&copy; 2018 <a class="link" href="https://twitter.com/jesse_squires" target="_blank" rel="external">Jesse Squires</a>. All rights reserved. (Last updated: 2018-01-01)</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>
</article>
Expand Down
5 changes: 1 addition & 4 deletions docs/Enums.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@
<li class="nav-group-task">
<a href="Protocols/ReusableViewProtocol.html">ReusableViewProtocol</a>
</li>
<li class="nav-group-task">
<a href="Protocols/SectionInfoProtocol.html">SectionInfoProtocol</a>
</li>
</ul>
</li>
<li class="nav-group-name">
Expand Down Expand Up @@ -152,7 +149,7 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2017 <a class="link" href="https://twitter.com/jesse_squires" target="_blank" rel="external">Jesse Squires</a>. All rights reserved. (Last updated: 2017-12-31)</p>
<p>&copy; 2018 <a class="link" href="https://twitter.com/jesse_squires" target="_blank" rel="external">Jesse Squires</a>. All rights reserved. (Last updated: 2018-01-01)</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>
</article>
Expand Down
5 changes: 1 addition & 4 deletions docs/Enums/ReusableViewType.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@
<li class="nav-group-task">
<a href="../Protocols/ReusableViewProtocol.html">ReusableViewProtocol</a>
</li>
<li class="nav-group-task">
<a href="../Protocols/SectionInfoProtocol.html">SectionInfoProtocol</a>
</li>
</ul>
</li>
<li class="nav-group-name">
Expand Down Expand Up @@ -182,7 +179,7 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2017 <a class="link" href="https://twitter.com/jesse_squires" target="_blank" rel="external">Jesse Squires</a>. All rights reserved. (Last updated: 2017-12-31)</p>
<p>&copy; 2018 <a class="link" href="https://twitter.com/jesse_squires" target="_blank" rel="external">Jesse Squires</a>. All rights reserved. (Last updated: 2018-01-01)</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>
</article>
Expand Down
5 changes: 1 addition & 4 deletions docs/Guides.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@
<li class="nav-group-task">
<a href="Protocols/ReusableViewProtocol.html">ReusableViewProtocol</a>
</li>
<li class="nav-group-task">
<a href="Protocols/SectionInfoProtocol.html">SectionInfoProtocol</a>
</li>
</ul>
</li>
<li class="nav-group-name">
Expand Down Expand Up @@ -113,7 +110,7 @@ <h1>Guides</h1>
</section>
</section>
<section id="footer">
<p>&copy; 2017 <a class="link" href="https://twitter.com/jesse_squires" target="_blank" rel="external">Jesse Squires</a>. All rights reserved. (Last updated: 2017-12-31)</p>
<p>&copy; 2018 <a class="link" href="https://twitter.com/jesse_squires" target="_blank" rel="external">Jesse Squires</a>. All rights reserved. (Last updated: 2018-01-01)</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>
</article>
Expand Down
103 changes: 34 additions & 69 deletions docs/Protocols.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@
<li class="nav-group-task">
<a href="Protocols/ReusableViewProtocol.html">ReusableViewProtocol</a>
</li>
<li class="nav-group-task">
<a href="Protocols/SectionInfoProtocol.html">SectionInfoProtocol</a>
</li>
</ul>
</li>
<li class="nav-group-name">
Expand Down Expand Up @@ -110,6 +107,39 @@ <h1>Protocols</h1>

</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:17JSQDataSourcesKit18DataSourceProtocolP"></a>
<a name="//apple_ref/swift/Protocol/DataSourceProtocol" class="dashAnchor"></a>
<a class="token" href="#/s:17JSQDataSourcesKit18DataSourceProtocolP">DataSourceProtocol</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>An instance conforming to <code>DataSourceProtocol</code> represents a sectioned data source
of items to be displayed in either a collection view or table view.</p>

<a href="Protocols/DataSourceProtocol.html" class="slightly-smaller">See more</a>
</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">protocol</span> <span class="kt">DataSourceProtocol</span></code></pre>

</div>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/CellParentViewProtocol"></a>
Expand Down Expand Up @@ -231,75 +261,10 @@ <h4>Declaration</h4>
</li>
</ul>
</div>
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:17JSQDataSourcesKit19SectionInfoProtocolP"></a>
<a name="//apple_ref/swift/Protocol/SectionInfoProtocol" class="dashAnchor"></a>
<a class="token" href="#/s:17JSQDataSourcesKit19SectionInfoProtocolP">SectionInfoProtocol</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>An instance conforming to <code>SectionInfoProtocol</code> represents a section of items.</p>

<a href="Protocols/SectionInfoProtocol.html" class="slightly-smaller">See more</a>
</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">protocol</span> <span class="kt">SectionInfoProtocol</span></code></pre>

</div>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:17JSQDataSourcesKit18DataSourceProtocolP"></a>
<a name="//apple_ref/swift/Protocol/DataSourceProtocol" class="dashAnchor"></a>
<a class="token" href="#/s:17JSQDataSourcesKit18DataSourceProtocolP">DataSourceProtocol</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>An instance conforming to <code>DataSourceProtocol</code> represents a data source of items to be displayed
in either a collection view or table view.</p>

<a href="Protocols/DataSourceProtocol.html" class="slightly-smaller">See more</a>
</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">protocol</span> <span class="kt">DataSourceProtocol</span></code></pre>

</div>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>&copy; 2017 <a class="link" href="https://twitter.com/jesse_squires" target="_blank" rel="external">Jesse Squires</a>. All rights reserved. (Last updated: 2017-12-31)</p>
<p>&copy; 2018 <a class="link" href="https://twitter.com/jesse_squires" target="_blank" rel="external">Jesse Squires</a>. All rights reserved. (Last updated: 2018-01-01)</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>
</article>
Expand Down
5 changes: 1 addition & 4 deletions docs/Protocols/CellParentViewProtocol.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@
<li class="nav-group-task">
<a href="../Protocols/ReusableViewProtocol.html">ReusableViewProtocol</a>
</li>
<li class="nav-group-task">
<a href="../Protocols/SectionInfoProtocol.html">SectionInfoProtocol</a>
</li>
</ul>
</li>
<li class="nav-group-name">
Expand Down Expand Up @@ -308,7 +305,7 @@ <h4>Return Value</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2017 <a class="link" href="https://twitter.com/jesse_squires" target="_blank" rel="external">Jesse Squires</a>. All rights reserved. (Last updated: 2017-12-31)</p>
<p>&copy; 2018 <a class="link" href="https://twitter.com/jesse_squires" target="_blank" rel="external">Jesse Squires</a>. All rights reserved. (Last updated: 2018-01-01)</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>
</article>
Expand Down
Loading

0 comments on commit 25ee7e2

Please sign in to comment.