Skip to content

Commit 2f37841

Browse files
committed
README fix
1 parent 7e3cbe5 commit 2f37841

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

README.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ class ViewController: FHDiffableTableViewController<Section, Item> {
7878
```
7979
>This is the most simple implementation of a FHDiffableTableViewController.
8080
81-
<br>
82-
8381
### Customize Cells
8482

8583
In order to use custom cells, the `cellProvider` property must be overritten. This works exactly the same for table view and collection view.
@@ -100,8 +98,6 @@ Do not forget to register the cell bevor you call `applySnapshot(_:)` the first
10098
tableView.register(CustomCell.self, forCellReuseIdentifier: "customCell")
10199
```
102100

103-
<br>
104-
105101
### Customize Header and Footer Views (only collection view)
106102

107103
In order to use custom header or footer views, the `supplementaryViewProvider` property must be overritten.
@@ -127,8 +123,6 @@ Do not forget to register the cell bevor you call `applySnapshot(_:)` the first
127123
collectionView.register(CustomHeader.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: "customHeader")
128124
```
129125

130-
<br>
131-
132126
### Custom Data Source
133127

134128
In case you want to change the behavior of the title creation or you want to use section index titles and other features you have to subclass the appropriate data source. For the table view it could look something like that:
@@ -158,8 +152,6 @@ override var dataSource: UITableViewDiffableDataSource<Section, Item> {
158152
}
159153
```
160154

161-
<br>
162-
163155
### Custom `applySnapshot(_:)`
164156

165157
You are not forced to use `applySnapshot(_:)` in combination with `FHDiffableDataSourceSection` array to apply snapshots to your `dataSource`. You can override the `applySnapshot(_:)` to change its behavior, create your own `applySnapshot()` method or do it manually as follows:
@@ -172,14 +164,10 @@ snapshot.appendItems([Item(title: "Detail Item")], toSection: .detail)
172164
dataSource.apply(snapshot, animatingDifferences: true, completion: nil)
173165
```
174166

175-
<br>
176-
177167
### init(layout:)
178168

179169
I use a custom initializer for the `FHDiffableCollectionViewController` which is based on an enum. This contains a case for `UICollectionViewFlowLayout`, for `UICollectionViewCompositionalLayout`, for a custom `UICollectionViewLayout` or a default case. The default case creates a compositional layout which is only intended to be used for testing.
180170

181-
<br>
182-
183171
## License
184172

185173
FHConstraints is available under the MIT license. See the [LICENSE](https://github.com/FelixHerrmann/FHDiffableViewControllers/blob/master/LICENSE) file for more info.

0 commit comments

Comments
 (0)