All Versions
Latest Version
Avg Release Cycle
74 days
Latest Release
27 days ago

Changelog History
Page 1

  • v8.0.0-beta.1

    September 02, 2020

    πŸ“š This is a major release with some breaking changes, please read DTCollectionViewManager 8.0 Migration Guide

    πŸ†• New

    • Cell and supplementary view events are now available inside mapping closure directly, for example:

      // Previous releasesmanager.register(PostCell.self) manager.didSelect(PostCell.self) { cell, model, indexPath in// React to selection}// Newmanager.register(PostCell.self) { mapping in mapping.didSelect { cell, model, indexPath in } }

    Those events are now tied to ViewModelMapping instance, which means, that events, registered this way, will only trigger, if mapping condition of current mapping applies. For example:

    manager.register(PostCell.self) { mapping in mapping.condition = .section(0) mapping.didSelect { cell, model, indexPath in// This closure will only get called, when user selects cell in the first section } } manager.register(PostCell.self) { mapping in mapping.condition = .section(1) mapping.didSelect { cell, model, indexPath in// This closure will only get called, when user selects cell in the second section } }
    • It's now possible to register collection view cells, that don't conform to DTModelTransfer protocol:

      manager.register(UICollectionViewCell.self, String.self) { cell, indexPath, model in// configure cell with model which is of type String when passed into configuration closure.}

    πŸ”§ This is particularly useful on iOS / tvOS 14 and higher, where you can configure UICollectionViewListCell without needing to subclass it.
    πŸ‘ Cells, registered in this way, can safely coexist with cells, that conform to DTModelTransfer protocol. Conditional mappings are also supported (multiple trailing closures syntax available in Swift 5.3):

    manager.register(UICollectionViewCell.self, for: String.self) { $0.condition = .section(0) } handler { cell, indexPath, model in// configure cell with model which is of type String when passed into configuration closure.}
    • βž• Added event reaction for UICollectionViewDelegate.collectionView(_:canEditItemAt:) delegate method.
    • βž• Added event reactions for tvOS 13 TVCollectionViewDelegateFullScreenLayout protocol from TVUIKit framework.
    • πŸ†• New readme and in-depth documentation, split into several sections for developer convenience.

    πŸ”„ Changed

    • On iOS/tvOS 14 and higher, cell and supplementary views now use UICollectionView.dequeueConfiguredReusableCell and UICollectionView.dequeueConfiguredReusableSupplementary to be dequeued.
    • ⚑️ DTModelTransfer update(with:) method for such cells and supplementary views is called immediately after dequeueConfiguredReusableCell \ dequeueConfiguredReusableSupplementary return.
    • πŸ‘ Generic placeholders for cell/model/view methods have been improved for better readability.

    πŸ’₯ Breaking

    πŸš€ This release requires Swift 5.3. Minimum iOS / tvOS deployment targets are unchanged (iOS 11, tvOS 11).

    πŸš€ Some context: this release heavily relies on where clauses on contextually generic declarations, that are only available in Swift 5.3 - SE-0267.

    • πŸ”§ Cells, headers and footers created in storyboard now need to be explicitly configured in view mapping:

      register(StoryboardCell.self) { mapping in mapping.cellRegisteredByStoryboard = true}registerHeader(StoryboardHeader.self) { mapping in mapping.supplementaryRegisteredByStoryboard = true}

    • All non-deprecated registration methods now have an additional handler closure, that allows to configure cells/headers/footers/supplementary views that are dequeued from UICollectionView. This is a direct replacement for configure(_:_:, configureHeader(_:_:), configureFooter(_:_:) and configureSupplementary(_:ofKind:_:, that are all now deprecated.

    • ⚑️ On iOS / tvOS 14 / Xcode 12 and higher handler closure, that is passed to registration methods, is used to call new dequeueConfiguredReusableCell(using:for:item:) and dequeueConfiguredReusableSupplementary(using:for:) methods on UICollectionView. Please note, that handler closure is called before DTModelTransfer.update(with:) method because of how new UICollectionView dequeue API works.

    • ViewModelMapping is now a generic class, that captures view and model information(ViewModelMapping<T,U>).

    • ⚑️ CollectionViewUpdater.batchUpdatesInProgress property was removed.

    πŸ—„ Deprecated

    • Several cell/header/footer/supplementary view registration methods have been deprecated to unify registration logic. Please use register(_:mapping:handler:), registerHeader(_:mapping:handler:), registerFooter(_:mapping:handler:) and registerSupplementary(_:forKind:mapping:handler:) as a replacements for all of those methods. For more information on those changes, please read migration guide
    • πŸ”§ DTCollectionViewManager.configureEvents(for:_:), it's functionality has become unnecessary since mapping closure of cell/supplementary registration now captures both cell and model type information for such events.
    • πŸ“š DTCollectionViewManager.configureDiffableDataSource(modelProvider:) for non-hashable data models. Please use configureDiffableDataSource method for models, that are Hashable. From Apple's documentation: If you’re working in a Swift codebase, always use UICollectionViewDiffableDataSource instead.

    πŸ›  Fixed

    • Supplementary views now correctly use ViewModelMapping.reuseIdentifier instead of falling back to name of the view class.
    • Several event API's have been improved to allow returning nil for methods, that accept nil as a valid value:
      contextMenuConfiguration, previewForHighlightingContextMenu, previewForDismissingContextMenu
  • v7.2.0

    July 02, 2020

    πŸ”„ Changed

    • πŸš€ Deployment targets - iOS 11 / tvOS 11.
    • Minimum Swift version required: 5.0
    • βž• Added support for DTModelStorage/Realm with Realm 5

    πŸ‘ Please note, that this framework version source is identical to previous version, which supports iOS 8 / tvOS 9 / Swift 4.2 and higher.

  • v7.1.0

    April 29, 2020

    πŸ”„ Changed

    • It's not longer necessary to import DTModelStorage framework to use it's API's. import DTCollectionViewManager now implicitly exports DTModelStorage as well.
  • v7.0.0

    November 08, 2019
    • 🚚 willCommitMenuWithAnimator method has been made unavailable for Xcode 11.2, because UICollectionViewDelegate method it used has been removed from UIKit on Xcode 11.2.
  • v7.0.0-beta.2

    September 06, 2019
    • βž• Added support for Xcode versions, that are older than Xcode 11.
  • v7.0.0-beta.1

    August 20, 2019

    πŸš€ 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?


    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
  • v6.6.0

    June 17, 2019
    • βž• Added support for Swift Package Manager in Xcode 11
  • v6.5.0

    April 07, 2019

    βž• Added

    • Convenience constructor for DTCollectionViewManager object: init(storage:) that allows to create it's instance without initializing MemoryStorage.
    • πŸ”§ Static variable defaultStorage on DTCollectionViewManager that allows to configure which Storage class is used by default.
    • πŸ“š Documentation
    • πŸ‘Œ Support for Xcode 10.2 and Swift 5

    βœ‚ Removed

    • πŸ‘Œ Support for Xcode 9 and Swift 3
  • v6.4.2

    February 05, 2019
    • move(:_,:_) method was deprecated and no longer works due to a logic bug, that can prevent this method from being called if sourceIndexPath is off screen when this event was called by UICollectionView. Please use new method moveItemAtTo(:_) to subscribe to move events in the datasource.
  • v6.4.1

    October 30, 2018
    • πŸ›  Fix infinite recursion bug with UICollectionView.canFocusItemAt(:) method(thanks, @skydivedan!)