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
}
}