7.0.0-beta.1
·
123 commits
to main
since this release
This is a major release with some breaking changes, please read DTTableViewManager 7.0 Migration Guide
Added
configureDiffableDataSource(modelProvider:)
method to enableUITableViewDiffableDataSource
withDTTableViewManager
.- Ability for
DTTableViewManageable
to implementtableView(_:viewForHeaderInSection:)
andtableView(_:viewForFooterInSection:)
to return view directly without going through storages. minimalHeaderHeightForTableView
andminimalFooterHeightForTableView
properties forTableViewConfiguration
, that allows configuring height for section headers and footers that need to be hidden.- Ability to customize bundle, from which xib files are loaded from by setting
bundle
property onViewModelMapping
inmappingBlock
. As before,bundle
defaults toBundle(for: ViewClass.self)
. DTTableViewManager.supplementaryStorage
getter, that conditionally casts current storage toSupplementaryStorage
protocol.
New method wrappers for iOS 13 API
shouldBeginMultipleSelectionInteraction
didBeginMultipleSelectionInteraction
didEndMultipleSelectionInteraction
contextMenuConfiguration(for:)
previewForHighlightingContextMenu
previewForDismissingContextMenu
willCommitMenuWithAnimator
Changed
- If tableView section does not contain any items, and
TableViewConfiguration.display<Header/Footer>OnEmptySection
property is set to false,DTTableViewManager
no longer asks for header footer height explicitly and returnsTableViewConfiguration.minimal<Header/Footer>HeightForTableView
. - Anomaly event verification now allows subclasses to prevent false-positives.
animateChangesOffScreen
property onTableViewUpdater
that allows to turn off animated updates forUITableView
when it is not on screen.
Removed
- Usage of previously deprecated and now removed from
DTModelStorage
ViewModelMappingCustomizing
protocol.
Breaking
DTModelStorage header, footer and supplementary model handling has been largely restructured to be a single closure-based API. Read more about changes in DTModelStorage changelog. As a result of those changes, several breaking changes in DTTableViewManager include:
SupplementaryAccessible
extension withtableHeaderModel
andtableFooterModel
properties has been removed.- Because headers/footers are now a closure based API,
setSectionHeaderModels
andsetSectionFooterModels
do not create sections by default, and do not call tableView.reloadData. - If a storage does not contain any sections, even if
configuration.displayHeaderOnEmptySections
orconfiguration.displayFooterOnEmptySections
is set, headers and footers will not be displayed, since there are no sections, which is different from present sections, that contain 0 items. For example, If you need to show a header or footer in empty section using MemoryStorage, you can callmemoryStorage.setItems([Int](), forSectionAt: emptySectionIndex)
, and now with empty section header and footer can be displayed.
Other breaking changes:
tableViewUpdater
will contain nil ifDTTableViewManager
is configured to work withUITableViewDiffableDataSource
.DTTableViewOptionalManageable
protocol was removed and replaced byoptionalTableView
property onDTTableViewManageable
protocol. One oftableView
/optionalTableView
properties must be implemented byDTTableViewManageable
instance to work withDTTableViewManager
.
Deprecated
Following methods have been deprecated due to their delegate methods being deprecated in iOS 13:
editActions(for:)
shouldShowMenuForItemAt
canPerformAction
performAction