Skip to content

Commit 25ee7e2

Browse files
committed
[Docs] update, re-gen for 7.0
1 parent 7928f44 commit 25ee7e2

24 files changed

+114
-487
lines changed

Guides/Getting Started.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ This library has four primary components:
1212

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

1818
## Example
1919

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

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

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

4444
// 4. create data source provider
4545
let dataSourceProvider = DataSourceProvider(dataSource: dataSource,
46-
cellFactory: cellFactory,
47-
supplementaryFactory: headerFactory)
46+
cellConfig: cellConfig,
47+
supplementaryConfig: headerConfig)
4848

4949
// 5. set the collection view's data source
5050
collectionView.dataSource = dataSourceProvider.collectionViewDataSource

docs/Classes.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@
7575
<li class="nav-group-task">
7676
<a href="Protocols/ReusableViewProtocol.html">ReusableViewProtocol</a>
7777
</li>
78-
<li class="nav-group-task">
79-
<a href="Protocols/SectionInfoProtocol.html">SectionInfoProtocol</a>
80-
</li>
8178
</ul>
8279
</li>
8380
<li class="nav-group-name">
@@ -246,7 +243,7 @@ <h4>Declaration</h4>
246243
</section>
247244
</section>
248245
<section id="footer">
249-
<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>
246+
<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>
250247
<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>
251248
</section>
252249
</article>

docs/Classes/DataSourceProvider.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@
7676
<li class="nav-group-task">
7777
<a href="../Protocols/ReusableViewProtocol.html">ReusableViewProtocol</a>
7878
</li>
79-
<li class="nav-group-task">
80-
<a href="../Protocols/SectionInfoProtocol.html">SectionInfoProtocol</a>
81-
</li>
8279
</ul>
8380
</li>
8481
<li class="nav-group-name">
@@ -477,7 +474,7 @@ <h4>Declaration</h4>
477474
</section>
478475
</section>
479476
<section id="footer">
480-
<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>
477+
<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>
481478
<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>
482479
</section>
483480
</article>

docs/Classes/FetchedResultsController.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@
7676
<li class="nav-group-task">
7777
<a href="../Protocols/ReusableViewProtocol.html">ReusableViewProtocol</a>
7878
</li>
79-
<li class="nav-group-task">
80-
<a href="../Protocols/SectionInfoProtocol.html">SectionInfoProtocol</a>
81-
</li>
8279
</ul>
8380
</li>
8481
<li class="nav-group-name">
@@ -262,7 +259,7 @@ <h4>Return Value</h4>
262259
</section>
263260
</section>
264261
<section id="footer">
265-
<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>
262+
<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>
266263
<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>
267264
</section>
268265
</article>

docs/Classes/FetchedResultsDelegateProvider.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@
7676
<li class="nav-group-task">
7777
<a href="../Protocols/ReusableViewProtocol.html">ReusableViewProtocol</a>
7878
</li>
79-
<li class="nav-group-task">
80-
<a href="../Protocols/SectionInfoProtocol.html">SectionInfoProtocol</a>
81-
</li>
8279
</ul>
8380
</li>
8481
<li class="nav-group-name">
@@ -415,7 +412,7 @@ <h4>Declaration</h4>
415412
</section>
416413
</section>
417414
<section id="footer">
418-
<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>
415+
<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>
419416
<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>
420417
</section>
421418
</article>

docs/Classes/TitledSupplementaryView.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@
7676
<li class="nav-group-task">
7777
<a href="../Protocols/ReusableViewProtocol.html">ReusableViewProtocol</a>
7878
</li>
79-
<li class="nav-group-task">
80-
<a href="../Protocols/SectionInfoProtocol.html">SectionInfoProtocol</a>
81-
</li>
8279
</ul>
8380
</li>
8481
<li class="nav-group-name">
@@ -252,7 +249,7 @@ <h4>Declaration</h4>
252249
</section>
253250
</section>
254251
<section id="footer">
255-
<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>
252+
<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>
256253
<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>
257254
</section>
258255
</article>

docs/Enums.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@
7575
<li class="nav-group-task">
7676
<a href="Protocols/ReusableViewProtocol.html">ReusableViewProtocol</a>
7777
</li>
78-
<li class="nav-group-task">
79-
<a href="Protocols/SectionInfoProtocol.html">SectionInfoProtocol</a>
80-
</li>
8178
</ul>
8279
</li>
8380
<li class="nav-group-name">
@@ -152,7 +149,7 @@ <h4>Declaration</h4>
152149
</section>
153150
</section>
154151
<section id="footer">
155-
<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>
152+
<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>
156153
<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>
157154
</section>
158155
</article>

docs/Enums/ReusableViewType.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@
7676
<li class="nav-group-task">
7777
<a href="../Protocols/ReusableViewProtocol.html">ReusableViewProtocol</a>
7878
</li>
79-
<li class="nav-group-task">
80-
<a href="../Protocols/SectionInfoProtocol.html">SectionInfoProtocol</a>
81-
</li>
8279
</ul>
8380
</li>
8481
<li class="nav-group-name">
@@ -182,7 +179,7 @@ <h4>Declaration</h4>
182179
</section>
183180
</section>
184181
<section id="footer">
185-
<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>
182+
<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>
186183
<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>
187184
</section>
188185
</article>

docs/Guides.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@
7575
<li class="nav-group-task">
7676
<a href="Protocols/ReusableViewProtocol.html">ReusableViewProtocol</a>
7777
</li>
78-
<li class="nav-group-task">
79-
<a href="Protocols/SectionInfoProtocol.html">SectionInfoProtocol</a>
80-
</li>
8178
</ul>
8279
</li>
8380
<li class="nav-group-name">
@@ -113,7 +110,7 @@ <h1>Guides</h1>
113110
</section>
114111
</section>
115112
<section id="footer">
116-
<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>
113+
<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>
117114
<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>
118115
</section>
119116
</article>

docs/Protocols.html

Lines changed: 34 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@
7575
<li class="nav-group-task">
7676
<a href="Protocols/ReusableViewProtocol.html">ReusableViewProtocol</a>
7777
</li>
78-
<li class="nav-group-task">
79-
<a href="Protocols/SectionInfoProtocol.html">SectionInfoProtocol</a>
80-
</li>
8178
</ul>
8279
</li>
8380
<li class="nav-group-name">
@@ -110,6 +107,39 @@ <h1>Protocols</h1>
110107

111108
</section>
112109
<section class="section task-group-section">
110+
<div class="task-group">
111+
<ul>
112+
<li class="item">
113+
<div>
114+
<code>
115+
<a name="/s:17JSQDataSourcesKit18DataSourceProtocolP"></a>
116+
<a name="//apple_ref/swift/Protocol/DataSourceProtocol" class="dashAnchor"></a>
117+
<a class="token" href="#/s:17JSQDataSourcesKit18DataSourceProtocolP">DataSourceProtocol</a>
118+
</code>
119+
</div>
120+
<div class="height-container">
121+
<div class="pointer-container"></div>
122+
<section class="section">
123+
<div class="pointer"></div>
124+
<div class="abstract">
125+
<p>An instance conforming to <code>DataSourceProtocol</code> represents a sectioned data source
126+
of items to be displayed in either a collection view or table view.</p>
127+
128+
<a href="Protocols/DataSourceProtocol.html" class="slightly-smaller">See more</a>
129+
</div>
130+
<div class="declaration">
131+
<h4>Declaration</h4>
132+
<div class="language">
133+
<p class="aside-title">Swift</p>
134+
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">DataSourceProtocol</span></code></pre>
135+
136+
</div>
137+
</div>
138+
</section>
139+
</div>
140+
</li>
141+
</ul>
142+
</div>
113143
<div class="task-group">
114144
<div class="task-name-container">
115145
<a name="/CellParentViewProtocol"></a>
@@ -231,75 +261,10 @@ <h4>Declaration</h4>
231261
</li>
232262
</ul>
233263
</div>
234-
<div class="task-group">
235-
<ul>
236-
<li class="item">
237-
<div>
238-
<code>
239-
<a name="/s:17JSQDataSourcesKit19SectionInfoProtocolP"></a>
240-
<a name="//apple_ref/swift/Protocol/SectionInfoProtocol" class="dashAnchor"></a>
241-
<a class="token" href="#/s:17JSQDataSourcesKit19SectionInfoProtocolP">SectionInfoProtocol</a>
242-
</code>
243-
</div>
244-
<div class="height-container">
245-
<div class="pointer-container"></div>
246-
<section class="section">
247-
<div class="pointer"></div>
248-
<div class="abstract">
249-
<p>An instance conforming to <code>SectionInfoProtocol</code> represents a section of items.</p>
250-
251-
<a href="Protocols/SectionInfoProtocol.html" class="slightly-smaller">See more</a>
252-
</div>
253-
<div class="declaration">
254-
<h4>Declaration</h4>
255-
<div class="language">
256-
<p class="aside-title">Swift</p>
257-
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">SectionInfoProtocol</span></code></pre>
258-
259-
</div>
260-
</div>
261-
</section>
262-
</div>
263-
</li>
264-
</ul>
265-
</div>
266-
<div class="task-group">
267-
<ul>
268-
<li class="item">
269-
<div>
270-
<code>
271-
<a name="/s:17JSQDataSourcesKit18DataSourceProtocolP"></a>
272-
<a name="//apple_ref/swift/Protocol/DataSourceProtocol" class="dashAnchor"></a>
273-
<a class="token" href="#/s:17JSQDataSourcesKit18DataSourceProtocolP">DataSourceProtocol</a>
274-
</code>
275-
</div>
276-
<div class="height-container">
277-
<div class="pointer-container"></div>
278-
<section class="section">
279-
<div class="pointer"></div>
280-
<div class="abstract">
281-
<p>An instance conforming to <code>DataSourceProtocol</code> represents a data source of items to be displayed
282-
in either a collection view or table view.</p>
283-
284-
<a href="Protocols/DataSourceProtocol.html" class="slightly-smaller">See more</a>
285-
</div>
286-
<div class="declaration">
287-
<h4>Declaration</h4>
288-
<div class="language">
289-
<p class="aside-title">Swift</p>
290-
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">DataSourceProtocol</span></code></pre>
291-
292-
</div>
293-
</div>
294-
</section>
295-
</div>
296-
</li>
297-
</ul>
298-
</div>
299264
</section>
300265
</section>
301266
<section id="footer">
302-
<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>
267+
<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>
303268
<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>
304269
</section>
305270
</article>

0 commit comments

Comments
 (0)