All Versions
59
Latest Version
Avg Release Cycle
72 days
Latest Release
-

Changelog History
Page 1

  • v10.0.0 Changes

    βž• Added

    • Wrappers for collectionView:selectionFollowsFocusForItemAtIndexPath: delegate method.
    • 🚚 Wrappers for iOS 15 UICollectionViewDelegate.collectionView(_:targetIndexPathForMoveOfItemFromOriginalIndexPath:atCurrentIndexPath:toProposedIndexPath:) delegate method.

    βœ‚ Removed

    • πŸš€ Wrappers for collectionView:willCommitMenuWithAnimator delegate method, that was only briefly available in Xcode 12, and was removed by Apple in one of Xcode 12 releases.

    πŸ”„ Changed

    • πŸš€ To align version numbers between DTModelStorage, DTTableViewManager and DTCollectionViewManager, DTCollectionViewManager will not have 9.x release, instead it's being released as 10.x.

    πŸ—„ Deprecated

    • 🚚 targetIndexPathForMovingItem deprecated on iOS / tvOS 15 and higher, because delegate method collectionView:targetIndexPathForMoveFromItemAt:toProposedIndexPath: was deprecated in favor of newer method.
  • v9.0.0-beta.1 Changes

    πŸ›  Fixed

    • Diffable datasources exceptions in Xcode 13 / iOS 15 with some internal restructuring.

    βœ‚ Removed

    • πŸ—„ Deprecated support for UICollectionViewDiffableDataSourceReference
  • v8.2.0 Changes

    πŸ”„ Changed

    • πŸ‘€ UICollectionViewDatasource.indexTitles(for:) and UICollectionViewDatasource.collectionView(_: indexPathForIndexTitle:at:) methods and events now require iOS 14 (and seem to be working only on iOS 14) as per SDK changes in Xcode 12.5.

    πŸ›  Fixed

    • ⚠ Xcode 12.5 / Swift 5.4 warnings
    • Cell and supplementary view anomaly verification now correctly checks if corresponding subclasses respond to init(frame:) initializer.
  • v8.1.0 Changes

    πŸš‘ This release fixes a critical issue with cell and supplementary reuse on iOS 14 / tvOS 14. If you are using 8.x release, it's highly recommended to upgrade to this release.

    πŸ”„ Changed

    • UICollectionView.CellRegistration and UICollectionView.SupplementaryRegistration on iOS 14 / tvOS 14 are now created once per mapping, thus properly allowing cell and supplementary reuse.

    πŸ—„ Deprecated

    • DTCollectionViewManagerAnomaly.differentCellReuseIdentifier. If you are using cells from code or from xib, please use empty reuseIdentifier, because on iOS 14 / tvOS 14 reuseIdentifiers are being set by UICollectionView.CellRegistration object. If you are using storyboards, set reuseIdentifier of the cell to cell subclass name.
  • v8.0.1 Changes

    πŸ›  Fixed

    • Typo, that caused anomalies to trigger when using events for UICollectionViewLayout(thanks, @RenGate).
  • v8.0.0 Changes

    October 27, 2020

    βž• Added

    • Registering events for UICollectionViewDelegateFlowLayout protocol now triggers an anomaly, if different layout class is used (for example UICollectionViewCompositionalLayout)
  • v8.0.0-beta.1 Changes

    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 Changes

    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 Changes

    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 Changes

    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.