Skip to content

4.1.0

Compare
Choose a tag to compare
@DenTelezhkin DenTelezhkin released this 04 Oct 17:31
· 429 commits to main since this release

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

Breaking changes

beforeContentUpdate and afterContentUpdate closures were replaced with DTTableViewContentUpdatable protocol, that can be adopted by your DTTableViewManageable class, for example:

extension PostsViewController: DTTableViewContentUpdatable {
    func afterContentUpdate() {
        // Do something
    }
}