You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
@@ -148,6 +158,8 @@ override var dataSource: UITableViewDiffableDataSource<Section, Item> {
148
158
}
149
159
```
150
160
161
+
<br>
162
+
151
163
### Custom `applySnapshot(_:)`
152
164
153
165
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:
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.
166
180
181
+
<br>
182
+
167
183
## License
168
184
169
185
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