All notable changes to this project will be documented in this file.
- Support for
UICollectionViewDelegate.collectionView(_:canPerformPrimaryActionForItemAt:)
andUICollectionViewDelegate.collectionView(_:performPrimaryActionForItemAt:)
delegate methods on iOS 16 and tvOS 16. - Support for
UICollectionViewDelegate.collectionView(_:contextMenuConfigurationForItemsAt:point:)
,UICollectionViewDelegate.collectionView(_:contextMenuConfiguration:highlightPreviewForItemAt:
) andUICollectionViewDelegate.collectionView(_:contextMenuConfiguration:dismissalPreviewForItemAt:
methods on iOS 16. - Support for
UIHostingConfiguration
on iOS 16 / tvOS 16 / macCatalyst 16:
manager.registerHostingConfiguration(for: Post.self) { _, post, _ in
UIHostingConfiguration {
PostView(post: post)
}
}
It's also possible to incorporate UIKit cell states by simply adding additional parameter to registration:
manager.registerHostingConfiguration(for: Post.self) { state, _, post, _ in
UIHostingConfiguration {
PostView(post: post, isSelected: state.isSelected)
}
}
Additionally, it's possible to customize UICollectionViewCell
being used to host SwiftUI view, for example for list cells:
manager.registerHostingConfiguration(for: Post.self, cell: UICollectionViewListCell.self) { _, post, _ in
UIHostingConfiguration {
PostView(post: post)
}
}
- Support for events, wrapping
UICollectionViewDataSourcePrefetching
protocol.
manager.register(PostCell.self) { mapping in
mapping.prefetch { model, indexPath in }
mapping.cancelPrefetch { model, indexPath in }
}
Please note, that while datasource methods are called once per array of indexPaths, events for models will be called individually, so single model (and indexPath) is passed to each event. Theoretically, this should make prefetching and cancellation easier, since you no longer need to walk through array and find all data models, you can operate on a single data model at a time.
- Cell / View events, registered with
DTCollectionViewManager
are soft-deprecated. Please use events in mapping instead:
Deprecated:
manager.register(PostCell.self)
manager.didSelect(PostCell.self) { postCell, post, indexPath in }
Recommended:
manager.register(PostCell.self) { mapping in
mapping.didSelect { postCell, post, indexPath in }
}
While previously main benefits for second syntax were mostly syntactic, now with support for SwiftUI it will be hard to actually specialize hosting cells (and might be impossible when iOS 16 hosting configuration is supported), so only second syntax will work for all kinds of cells, and first syntax can only work for non-SwiftUI cells. New delegate methods for UICollectionView (starting with iOS 16 / tvO 16 SDK) will be added only as extension to mapping protocols, not DTCollectionViewManager itself.
Registering SwiftUI views as content for collection view cells:
manager.registerHostingCell(for: Post.self) { model, indexPath in
PostSwiftUIView(model: model)
}
This method is supported on iOS 13+ / tvOS 13+ / macCatalyst 13+.
Please note, that this integration is not supported by Apple, therefore it comes with several workarounds, read more about those in SwiftUI support document
HostingCellViewModelMapping
-CellViewModelMapping
subclass to register mappings fro SwiftUI views.HostingCollectionViewCell
-UICollectionViewCell
subclass , implementing container for SwiftUI view embedded into it.HostingCollectionViewCellConfiguration
- configuration for SwiftUI views hosting insideHostingCollectionViewCell
.
- Event reactions are now defined in protocol extension instead of extending former
ViewModelMapping
protocol, thus allowing to call those methods not only for UIKit mappings, but SwiftUI-hosted cells as well.
ViewModelMapping
class and it's protocol have been split into multiple classes and protocols for better subclassability (for exampleCellViewModelMapping
/CollectionViewCellModelMapping
). Please note, that while technically this is breaking, it's very unlikely to break anything in code, since this type is only present in mapping closures, and public interfaces did not change at all.
- Wrappers for
collectionView:selectionFollowsFocusForItemAtIndexPath:
delegate method. - Wrappers for iOS 15
UICollectionViewDelegate.collectionView(_:targetIndexPathForMoveOfItemFromOriginalIndexPath:atCurrentIndexPath:toProposedIndexPath:)
delegate method.
- 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.
- To align version numbers between
DTModelStorage
,DTTableViewManager
andDTCollectionViewManager
,DTCollectionViewManager
will not have 9.x release, instead it's being released as 10.x.
targetIndexPathForMovingItem
deprecated on iOS / tvOS 15 and higher, because delegate methodcollectionView:targetIndexPathForMoveFromItemAt:toProposedIndexPath:
was deprecated in favor of newer method.
- Diffable datasources exceptions in Xcode 13 / iOS 15 with some internal restructuring.
- Deprecated support for
UICollectionViewDiffableDataSourceReference
UICollectionViewDatasource
.indexTitles(for:)
andUICollectionViewDatasource
.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.
- Xcode 12.5 / Swift 5.4 warnings
- Cell and supplementary view anomaly verification now correctly checks if corresponding subclasses respond to
init(frame:)
initializer.
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.
UICollectionView.CellRegistration
andUICollectionView.SupplementaryRegistration
on iOS 14 / tvOS 14 are now created once per mapping, thus properly allowing cell and supplementary reuse.
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 byUICollectionView.CellRegistration
object. If you are using storyboards, set reuseIdentifier of the cell to cell subclass name.
- Typo, that caused anomalies to trigger when using events for UICollectionViewLayout(thanks, @RenGate).
- Registering events for
UICollectionViewDelegateFlowLayout
protocol now triggers an anomaly, if different layout class is used (for exampleUICollectionViewCompositionalLayout
)
This is a major release with some breaking changes, please read DTCollectionViewManager 8.0 Migration Guide
- Cell and supplementary view events are now available inside mapping closure directly, for example:
// Previous releases
manager.register(PostCell.self)
manager.didSelect(PostCell.self) { cell, model, indexPath in
// React to selection
}
// New
manager.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 fromTVUIKit
framework. - New readme and in-depth documentation, split into several sections for developer convenience.
- On iOS/tvOS 14 and higher, cell and supplementary views now use
UICollectionView.dequeueConfiguredReusableCell
andUICollectionView.dequeueConfiguredReusableSupplementary
to be dequeued. DTModelTransfer
update(with:)
method for such cells and supplementary views is called immediately afterdequeueConfiguredReusableCell
\dequeueConfiguredReusableSupplementary
return.- Generic placeholders for cell/model/view methods have been improved for better readability.
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 forconfigure(_:_:
,configureHeader(_:_:)
,configureFooter(_:_:)
andconfigureSupplementary(_: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:)
anddequeueConfiguredReusableSupplementary(using:for:)
methods on UICollectionView. Please note, that handler closure is called beforeDTModelTransfer.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.
- 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:)
andregisterSupplementary(_: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
.
- 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
- 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.
- It's not longer necessary to import DTModelStorage framework to use it's API's.
import DTCollectionViewManager
now implicitly exportsDTModelStorage
as well.
willCommitMenuWithAnimator
method has been made unavailable for Xcode 11.2, becauseUICollectionViewDelegate
method it used has been removed from UIKit on Xcode 11.2.
- Added support for Xcode versions, that are older than Xcode 11.
This is a major release with some breaking changes, please read DTCollectionViewManager 7.0 Migration Guide
- 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.
configureDiffableDataSource(modelProvider:)
method to enableUICollectionViewDiffableDataSource
withDTCollectionViewManager
.DTCollectionViewManager.supplementaryStorage
getter, that conditionally casts current storage toSupplementaryStorage
protocol.- 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
- Usage of previously deprecated and now removed from
DTModelStorage
ViewModelMappingCustomizing
protocol.
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.- 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.
Following methods have been deprecated due to their delegate methods being deprecated in iOS 13:
shouldShowMenuForItemAt
canPerformAction
performAction
- Added support for Swift Package Manager in Xcode 11
- Convenience constructor for
DTCollectionViewManager
object:init(storage:)
that allows to create it's instance without initializingMemoryStorage
. - Static variable
defaultStorage
onDTCollectionViewManager
that allows to configure whichStorage
class is used by default. - Documentation
- Support for Xcode 10.2 and Swift 5
- Support for Xcode 9 and Swift 3
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 byUICollectionView
. Please use new methodmoveItemAtTo(:_)
to subscribe to move events in the datasource.
- Fix infinite recursion bug with UICollectionView.canFocusItemAt(:) method(thanks, @skydivedan!)
- Support for Xcode 10 and Swift 4.2
- Anomaly-detecting and reporting system for
DTCollectionViewManager
. Read more about it in Anomaly Handler Readme section. Anomaly handler system requires Swift 4.1 and higher. - Support for Swift 4.2 in Xcode 10 (beta 1).
- Calling
startManaging(withDelegate:_)
method is no longer required.
viewFactoryErrorHandler
property onDTCollectionViewManager
was removed, all supported errors and warnings are now a part of anomaly reporting system
- Implemented new system for deferring datasource updates until
performBatchUpdates
block. This system is intended to fight crash, that might happen whenperformBatchUpdates
method is called afterUICollectionView.reloadData
method(for example after callingmemoryStorage.setItems
, and then immediatelymemoryStorage.addItems
). This issue is detailed in #27 and #23. This crash can also happen, if iOS 11 APIUITableView.performBatchUpdates
is used. This system is turned on by default. If, for some reason, you want to disable it and have old behavior, call:
manager.memoryStorage.defersDatasourceUpdates = false
Please note, though, that new default behavior is recommended, because it is more stable and works the same on both UITableView and UICollectionView.
collectionViewUpdater
property onDTCollectionViewManager
is now ofCollectionViewUpdater
type instead of opaqueStorageUpdating
type. This should ease use of this object and prevent unneccessary type casts.
- Updated for Xcode 9.1 / Swift 4.0.2
- Makes
DTCollectionViewManager
property weak instead of unowned to prevent iOS 10-specific memory issues/crashes.
- Build with Xcode 9.0 final release.
- Fixed partial-availability warnings.
This is a major release with some breaking changes, please read DTTableViewManager 6.0 Migration Guide
- Added
updateVisibleCells(_:) method
, that allows updating cell data for visible cells with callback on each cell. This is more efficient than callingreloadData
when number of elements inUICollectionView
does not change, and only contents of items change. - Implement
configureEvents(for:_:)
method, that allows batching in several cell events to avoid using T.ModelType for events, that do not have cell created. - Added
DTCollectionViewDropPlaceholderContext
wrapper with convenience support for UICollectionView placeholders. - Implemented
UICollectionViewDragDelegate
andUICollectionViewDropDelegate
events. - Added 10 more
UICollectionViewDelegate
andUICollectionViewDelegateFlowLayout
events. - Added missing events for
UICollectionViewDatasource
protocol:collectionView:moveItemAt:to:
,indexTitlesFor:
,collectionView:indexPathForIndexTitle:at:
- Implemented conditional mappings
UICollectionViewDelegate
andUICollectionViewDatasource
implementations have been refactored fromDTCollectionViewManager
toDTCollectionViewDelegate
andDTCollectionViewDataSource
classes.- Added
DTCollectionViewNonOptionalManageable
protocol, that can be used with non-optionalUICollectionView
properties on your managed instance.
- Initial support for Swift 3.2 (Xcode 9 beta-1).
- Fixed
registerNiblessHeader
andregisterNiblessFooter
to properly call nibless supplementary methods.
- Use new events system from
DTModelStorage
, that allows events to be properly called for cells, that are created usingViewModelMappingCustomizing
protocol.
- Setting
CollectionViewUpdater
instance tocollectionViewUpdater
property onDTCollectionViewManager
now triggersdidUpdateContent
closure onCollectionViewUpdater
.
Dependency changelog -> DTModelStorage 4.0.0 and higher
CollectionViewUpdater
has been rewritten to use newStorageUpdate
properties that track changes in order of their occurence.CollectionViewUpdater
reloadItemClosure
andDTCollectionViewManager
updateCellClosure
now accept indexPath and model instead of just indexPath. This is done because update may happen after insertions and deletions and object that needs to be updated may exist on different indexPath.
No changes
- Enables
RealmStorage
fromDTModelStorage
dependency.
This is a major release, written in Swift 3. Read Migration guide with descriptions of all features and changes.
Dependency changelog -> DTModelStorage 3.0.0 and higher
- New events system that covers almost all available
UICollectionViewDelegate
,UICollectionViewDataSource
andUICollectionViewDelegateFlowLayout
delegate methods. - New class -
CollectionViewUpdater
, that is calling all animation methods forUICollectionView
when required by underlying storage. updateCellClosure
method onDTCollectionViewManager
, that manually updates visible cell instead of callingcollectionView.reloadItemsAt(_:)
method.coreDataUpdater
property onDTCollectionViewManager
, that createsCollectionViewUpdater
object, that follows Apple's guide for updatingUICollectionView
fromNSFetchedResultsControllerDelegate
events.isManagingCollectionView
property onDTCollectionViewManager
.unregisterCellClass(_:)
,unregisterHeaderClass(_:)
,unregisterFooterClass(_:)
,unregisterSupplementaryClass(_:forKind:)
methods to unregister mappings fromDTCollectionViewManager
andUICollectionView
- Swift 3 API Design guidelines have been applied to all public API.
- Event system is migrated to new
EventReaction
class fromDTModelStorage
- Now all view registration methods use
NSBundle(forClass:)
constructor, instead of falling back onDTCollectionViewManager
viewBundle
property. This allows having cells from separate bundles or frameworks to be used with singleDTCollectionViewManager
instance.
viewBundle
property onDTCollectionViewManager
itemForVisibleCell
,itemForCellClass:atIndexPath:
,itemForHeaderClass:atSectionIndex:
,itemForFooterClass:atSectionIndex:
were removed - they were not particularly useful and can be replaced with much shorter Swift conditional typecasts.- All events methods with method pointer semantics. Please use block based methods instead.
registerCellClass:whenSelected
method, that was tightly coupling something that did not need coupling.
- Now all view registration methods use
NSBundle(forClass:)
constructor, instead of falling back onDTCollectionViewManager
viewBundle
property. This allows having cells from separate bundles or frameworks to be used with singleDTCollectionViewManager
instance.
viewBundle
property onDTCollectionViewManager
Dependency changelog -> DTModelStorage 2.6.0 and higher
Dependency changelog -> DTModelStorage 2.5 and higher
- Update to Swift 2.2. This release is not backwards compatible with Swift 2.1.
- Require Only-App-Extension-Safe API is set to YES in framework targets.
Dependency changelog -> DTModelStorage 2.4 and higher
- Support for Realm database storage - using
RealmStorage
class. batchUpdatesInProgress
property onDTCollectionViewManager
that indicates if batch updates are finished or not.
- UIReactions now properly unwrap data models, even for cases when model contains double optional value.
- Fixed a rare crash, that could happen when new items are being added to UICollectionView prior to UICollectionView calling any delegate methods
- Issue with Swift 2.1.1 (XCode 7.2) where storage.delegate was not set during initialization
Dependency changelog -> DTModelStorage 2.3 and higher
This release aims to improve mapping system and error reporting.
- New mapping system with support for protocols and subclasses
- Mappings can now be customized using
DTViewModelMappingCustomizable
protocol. - Custom error handler for
DTCollectionViewFactoryError
errors.
- preconditionFailures have been replaced with
DTCollectionViewFactoryError
ErrorType - Internal
CollectionViewReaction
class have been replaced byUIReaction
class from DTModelStorage.
Dependency changelog -> DTModelStorage 2.2 and higher
- Added support for AppleTV platform (tvOS)
- Footer and supplementary configuration closures and method pointers
- Improved failure cases for situations where cell or supplementary mappings were not found
- Improved stability by treating UICollectionView as optional
Dependency changelog -> DTModelStorage 2.1 and higher
This release aims to improve storage updates and UI animation with UICollectionView. To make this happen, DTModelStorage
classes were rewritten and rearchitectured, allowing finally to remove truly historic workaround. This code was initially written to fix first item insertion and deletion of items in UICollectionView. Somewhere between iOS 6 and iOS 8 Apple has fixed bugs, that caused this behaviour to happen. This is not documented, and was not mentioned anywhere, and i was very lucky to find this out by accident. So finally, I was able to remove these workarounds(which by the way are almost two years old), and UICollectionView UI updates code is as clean as UITableView UI updates code.
There are some backwards-incompatible changes in this release, however Xcode quick-fix tips should guide you through what needs to be changed.
registerNiblessCellClass
andregisterNiblessSupplementaryClass
methods to support creating cells and supplementary views from code
- Fixed
cellConfiguration
method, that was working incorrectly - Fixed retain cycles in event blocks
New events registration system with method pointers, that automatically breaks retain cycles.
For example, cell selection:
manager.cellSelection(PostsViewController.selectedCell)
func selectedCell(cell: PostCell, post: Post, indexPath: NSIndexPath) {
// Do something, push controller probably?
}
Alternatively, you can use dynamicType to register method pointer:
manager.cellSelection(self.dynamicType.selectedCell)
Other available events:
- cellConfiguration
- headerConfiguration
- footerConfiguration
- supplementaryConfiguration
beforeContentUpdate
and afterContentUpdate
closures were replaced with DTCollectionViewContentUpdatable
protocol, that can be adopted by your DTCollectionViewManageable
class, for example:
extension PostsViewController: DTCollectionViewContentUpdatable {
func afterContentUpdate() {
// Do something
}
}
4.0 is a next major release of DTCollectionViewManager
. It was rewritten from scratch in Swift 2 and is not backwards-compatible with previous releases.
- Improved
ModelTransfer
protocol with associatedModelType
DTCollectionViewManager
is now a separate object- New events system, that allows reacting to cell selection, cell/header/footer configuration and content updates
- Added support for
UICollectionViewController
, and any other object, that hasUICollectionView
- New storage object generic-type getters
- Support for Swift types - classes, structs, enums, tuples.
- Fixed an issue, where storageDidPerformUpdate method could be called without any updates.
- Added support for installation using Carthage 🍻
- Added nullability annotations for XCode 6.3 and Swift 1.2
Fixed issue, that could lead to wrong collection items being removed, when using memory storage removeItemsAtIndexPaths: method.
Added support for installation as a framework via CocoaPods - requires iOS 8 and higher deployment target.
3.0 is a next major release of DTCollectionViewManager. Read all about changes in detail on a wiki page.
- Full Swift support, including swift model classes
- Added convenience method to update section items
- Added
DTCollectionViewControllerEvents
protocol, that allows developer to react to changes in datasource - Added several convenience method for UICollectionViewFlowLayout. The API for supplementary header and footer registration now matches the API of DTTableViewManager.
- Added
collectionHeaderModel
andcollectionFooterModel
accessors forDTSectionModel
.
DTStorage
protocol was renamed toDTStorageProtocol
.
This is a release, that is targeted at improving code readability, and reducing number of classes and protocols inside DTCollectionViewManager architecture.
DTCollectionViewMemoryStorage
class was removed. It's methods were transferred toDTMemoryStorage+DTCollectionViewManagerAdditions
category.DTCollectionViewStorageUpdating
protocol was removed. It's methods were moved toDTCollectionViewController
.
- When using
DTCoreDataStorage
, section titles are displayed as headers by default(UICollectionElementKindSectionHeader), if NSFetchedController was created with sectionNameKeyPath property.
Add ability to use custom xibs for collection view cells and supplementary views.
Preliminary support for Swift.
If you use cells or supplementary views inside storyboards from Swift, implement optional reuseIdentifier method to return real Swift class name instead of the mangled one. This name should also be set as reuseIdentifier in storyboard.
Reuse identifier now needs to be identical to cell, header or footer class names. For example, UserTableCell should now have "UserTableCell" reuse identifier.
Removed DTModelSearching
protocol, please use DTMemoryStorage
setSearchingBlock:forModelClass:
method instead.
DTModelSearching
protocol is deprecated and is replaced by memoryStorage method setSearchingBlock:forModelClass:- UICollectionViewDatasource and UICollectionViewDelegate properties for UICollectionView are now filled automatically.
- Added more assertions, programmer errors should be more easily captured.
- DTModelTransfer and DTModelSearching protocols are now moved to DTModelStorage repo.
- Implemented searching in UICollectionView
- Added support for custom storage classes
- Current storage classes moved to separate repo(DTModelStorage)
- Complete rewrite of internal architecture
- Added support for storyboard cell, header and footer prototyping
- Dropped support for creating cells, headers and footers from code
First release of DTCollectionViewManager, woohoo!
- Clean mapping system
- Easy API for collection models manipulation
- Foundation types support
- Full iOS 7 support!