Releases: DenTelezhkin/DTCollectionViewManager
4.6.0
Dependency changelog -> DTModelStorage 2.5 and higher
Breaking
- Update to Swift 2.2. This release is not backwards compatible with Swift 2.1.
Changed
- Require Only-App-Extension-Safe API is set to YES in framework targets.
4.5.2
4.5.0
Dependency changelog -> DTModelStorage 2.4 and higher
Added
- Support for Realm database storage - using
RealmStorage
class. batchUpdatesInProgress
property onDTCollectionViewManager
that indicates if batch updates are finished or not.
Changed
- UIReactions now properly unwrap data models, even for cases when model contains double optional value.
4.4.2
Fixed
- Fixed a rare crash, that could happen when new items are being added to UICollectionView prior to UICollectionView calling any delegate methods
4.4.1
Fixed
- Issue with Swift 2.1.1 (XCode 7.2) where storage.delegate was not set during initialization
4.4.0
Dependency changelog -> DTModelStorage 2.3 and higher
This release aims to improve mapping system and error reporting.
Added
- New mapping system with support for protocols and subclasses
- Mappings can now be customized using
DTViewModelMappingCustomizable
protocol. - Custom error handler for
DTTableViewFactoryError
errors.
Changed
- preconditionFailures have been replaced with
DTCollectionViewFactoryError
ErrorType - Internal
CollectionViewReaction
class have been replaced byUIReaction
class from DTModelStorage.
4.3.0
Dependency changelog -> DTModelStorage 2.2 and higher
Changed
- Added support for AppleTV platform (tvOS)
Fixed
- Footer and supplementary configuration closures and method pointers now work correctly.
Changed
- Improved failure cases for situations where cell or supplementary mappings were not found
4.2.1
Updated
- Improved stability by treating UICollectionView as optional
4.2.0
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.
Added
registerNiblessCellClass
andregisterNiblessSupplementaryClass
methods to support creating cells and supplementary views from code
Bugfixes
- Fixed
cellConfiguration
method, that was working incorrectly - Fixed retain cycles in event blocks
4.1.0
Features
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
Breaking changes
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
}
}