Skip to content

Releases: DenTelezhkin/DTCollectionViewManager

4.6.0

27 Apr 11:51
Compare
Choose a tag to compare

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

10 Jan 10:47
Compare
Choose a tag to compare

Fixes

  • Fixed a bug, where supplementary views from storyboards did not have their outlets properly initialized(@RenGate, #16)

4.5.0

05 Jan 16:23
Compare
Choose a tag to compare

Dependency changelog -> DTModelStorage 2.4 and higher

Added

  • Support for Realm database storage - using RealmStorage class.
  • batchUpdatesInProgress property on DTCollectionViewManager 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

09 Dec 14:39
Compare
Choose a tag to compare

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

09 Dec 12:42
Compare
Choose a tag to compare

Fixed

  • Issue with Swift 2.1.1 (XCode 7.2) where storage.delegate was not set during initialization

4.4.0

30 Nov 16:23
Compare
Choose a tag to compare

Dependency changelog -> DTModelStorage 2.3 and higher

This release aims to improve mapping system and error reporting.

Added

Changed

  • preconditionFailures have been replaced with DTCollectionViewFactoryError ErrorType
  • Internal CollectionViewReaction class have been replaced by UIReaction class from DTModelStorage.

4.3.0

01 Nov 18:58
Compare
Choose a tag to compare

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

12 Oct 08:30
Compare
Choose a tag to compare

Updated

  • Improved stability by treating UICollectionView as optional

4.2.0

11 Oct 18:15
Compare
Choose a tag to compare

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 and registerNiblessSupplementaryClass 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

04 Oct 17:29
Compare
Choose a tag to compare

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