DTTableViewManager v7.0.0-beta.1 Release Notes

Release Date: 2019-08-20 // over 4 years ago
  • ๐Ÿš€ This is a major release with some breaking changes, please read DTTableViewManager 7.0 Migration Guide

    โž• Added

    • ๐Ÿ”ง configureDiffableDataSource(modelProvider:) method to enable UITableViewDiffableDataSource with DTTableViewManager.
    • Ability for DTTableViewManageable to implement tableView(_:viewForHeaderInSection:) and tableView(_:viewForFooterInSection:) to return view directly without going through storages.
    • ๐Ÿ”ง minimalHeaderHeightForTableView and minimalFooterHeightForTableView properties for TableViewConfiguration, that allows configuring height for section headers and footers that need to be hidden.
    • 0๏ธโƒฃ Ability to customize bundle, from which xib files are loaded from by setting bundle property on ViewModelMapping in mappingBlock. As before, bundle defaults to Bundle(for: ViewClass.self).
    • DTTableViewManager.supplementaryStorage getter, that conditionally casts current storage to SupplementaryStorage 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 returns TableViewConfiguration.minimal<Header/Footer>HeightForTableView.
    • Anomaly event verification now allows subclasses to prevent false-positives.
    • โšก๏ธ animateChangesOffScreen property on TableViewUpdater that allows to turn off animated updates for UITableView 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 with tableHeaderModel and tableFooterModel properties has been removed.
    • 0๏ธโƒฃ Because headers/footers are now a closure based API, setSectionHeaderModels and setSectionFooterModels do not create sections by default, and do not call tableView.reloadData.
    • ๐Ÿ”ง If a storage does not contain any sections, even if configuration.displayHeaderOnEmptySections or configuration.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 call memoryStorage.setItems([Int](), forSectionAt: emptySectionIndex), and now with empty section header and footer can be displayed.

    Other breaking changes:

    • โšก๏ธ tableViewUpdater will contain nil if DTTableViewManager is configured to work with UITableViewDiffableDataSource.
    • ๐Ÿšš DTTableViewOptionalManageable protocol was removed and replaced by optionalTableView property on DTTableViewManageable protocol. One of tableView/optionalTableView properties must be implemented by DTTableViewManageable instance to work with DTTableViewManager.

    ๐Ÿ—„ Deprecated

    ๐Ÿ—„ Following methods have been deprecated due to their delegate methods being deprecated in iOS 13:

    • editActions(for:)
    • shouldShowMenuForItemAt
    • canPerformAction
    • performAction