DTCollectionViewManager 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 DTCollectionViewManager 7.0 Migration Guide

    ๐Ÿ”„ Changed

    • DTCollectionViewManager now requires to be built with Swift 4.2 and later.
    • Anomaly event verification now allows subclasses to prevent false-positives.
    • โšก๏ธ animateChangesOffScreen property on CollectionViewUpdater that allows to turn off animated updates for UICollectionView when it is not on screen.

    โž• Added

    • ๐Ÿ”ง configureDiffableDataSource(modelProvider:) method to enable UICollectionViewDiffableDataSource with DTCollectionViewManager.
    • DTCollectionViewManager.supplementaryStorage getter, that conditionally casts current storage to SupplementaryStorage protocol.
    • 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).

    ๐Ÿ†• New method wrappers for iOS 13 API

    • shouldBeginMultipleSelectionInteraction
    • didBeginMultipleSelectionInteraction
    • didEndMultipleSelectionInteraction
    • contextMenuConfiguration(for:)
    • previewForHighlightingContextMenu
    • previewForDismissingContextMenu
    • willCommitMenuWithAnimator

    โœ‚ 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 DTCollectionViewManager include:

    • ๐Ÿšš SectionModel extension with collectionHeaderModel and collectionFooterModel 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 collectionView.reloadData.

    Other breaking changes:

    • โšก๏ธ collectionViewUpdater will contain nil if DTCollectionViewManager is configured to work with UICollectionViewDiffableDataSource.
    • ๐Ÿšš DTCollectionViewNonOptionalManageable protocol was removed and replaced by collectionView property on DTCollectionViewManageable protocol. One of collectionView/optionalCollectionView properties must be implemented by DTCollectionViewManageable instance to work with DTCollectionViewManager.
    • collectionView property in DTCollectionViewManageable protocol is now ImplicitlyUnwrappedOptional instead of Optional. This change is done to unify API with UICollectionViewController change and DTTableViewManager API for consistency.

    โš  WARNING Because of default implementations for new property this will not show as a compile error, instead crashing in runtime. Please make sure to update all definitions of

    var collectionView: UICollectionView?

    to

    var collectionView: UICollectionView!.

    If you need optional collection view, use optionalCollectionView property instead.

    ๐Ÿ—„ Deprecated

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

    • shouldShowMenuForItemAt
    • canPerformAction
    • performAction