Skip to content

Commit 9d55f14

Browse files
committed
Update collection views inits and docs.
1 parent a87f402 commit 9d55f14

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

SPDiffable.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = 'SPDiffable'
4-
s.version = '1.3.1'
4+
s.version = '1.3.2'
55
s.summary = 'Extenshion of Diffable API which allow not duplicate code and use less models.'
66
s.homepage = 'https://github.com/ivanvorobei/SPDiffable'
77
s.source = { :git => 'https://github.com/ivanvorobei/SPDiffable.git', :tag => s.version }

Sources/SPDiffable/Collection/SPDiffableCollectionController.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,17 @@ open class SPDiffableCollectionController: UICollectionViewController {
4040
If need custom logic, you can manually init and apply data when you need.
4141

4242
- warning: Changes applied not animatable.
43-
- parameter providers: Cell Providers with valid order for processing.
43+
- parameter cellProviders: Cell providers with valid order for processing.
44+
- parameter supplementaryViewProviders: Supplementary view providers with valid order for processing.
45+
- parameter headerAsFirstCell: Flag for use header as cell or supplementary.
4446
- parameter sections: Content as array of `SPDiffableSection`.
4547
*/
4648
open func setCellProviders(
4749
_ cellProviders: [SPDiffableCollectionCellProvider],
4850
supplementaryViewProviders: [SPDiffableCollectionSupplementaryViewProvider] = [],
49-
sections: [SPDiffableSection])
50-
{
51+
headerAsFirstCell: Bool = true,
52+
sections: [SPDiffableSection]
53+
) {
5154
diffableDataSource = SPDiffableCollectionDataSource(
5255
collectionView: collectionView,
5356
cellProviders: cellProviders,

Sources/SPDiffable/Collection/SPDiffableCollectionView.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,17 @@ open class SPDiffableCollectionView: UICollectionView, UICollectionViewDelegate
5656
If need custom logic, you can manually init and apply data when you need.
5757

5858
- warning: Changes applied not animatable.
59-
- parameter providers: Cell Providers with valid order for processing.
59+
- parameter cellProviders: Cell providers with valid order for processing.
60+
- parameter supplementaryViewProviders: Supplementary view providers with valid order for processing.
61+
- parameter headerAsFirstCell: Flag for use header as cell or supplementary.
6062
- parameter sections: Content as array of `SPDiffableSection`.
6163
*/
6264
open func setCellProviders(
6365
_ cellProviders: [SPDiffableCollectionCellProvider],
6466
supplementaryViewProviders: [SPDiffableCollectionSupplementaryViewProvider] = [],
65-
sections: [SPDiffableSection])
66-
{
67+
headerAsFirstCell: Bool = true,
68+
sections: [SPDiffableSection]
69+
) {
6770
diffableDataSource = SPDiffableCollectionDataSource(
6871
collectionView: self,
6972
cellProviders: cellProviders,

0 commit comments

Comments
 (0)