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 onCollectionViewUpdater
that allows to turn off animated updates forUICollectionView
when it is not on screen.
โ Added
- ๐ง
configureDiffableDataSource(modelProvider:)
method to enableUICollectionViewDiffableDataSource
withDTCollectionViewManager
. DTCollectionViewManager.supplementaryStorage
getter, that conditionally casts current storage toSupplementaryStorage
protocol.- 0๏ธโฃ 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)
.
๐ 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 withcollectionHeaderModel
andcollectionFooterModel
properties has been removed. - 0๏ธโฃ Because headers/footers are now a closure based API,
setSectionHeaderModels
andsetSectionFooterModels
do not create sections by default, and do not call collectionView.reloadData.
Other breaking changes:
- โก๏ธ
collectionViewUpdater
will contain nil ifDTCollectionViewManager
is configured to work withUICollectionViewDiffableDataSource
. - ๐
DTCollectionViewNonOptionalManageable
protocol was removed and replaced bycollectionView
property onDTCollectionViewManageable
protocol. One ofcollectionView
/optionalCollectionView
properties must be implemented byDTCollectionViewManageable
instance to work withDTCollectionViewManager
. collectionView
property inDTCollectionViewManageable
protocol is nowImplicitlyUnwrappedOptional
instead ofOptional
. This change is done to unify API withUICollectionViewController
change andDTTableViewManager
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