DTModelStorage

Storage classes for datasource based controls

MIT License

Stars
79
Committers
10

Bot releases are hidden (Show)

DTModelStorage - 7.2.0

Published by DenTelezhkin about 6 years ago

Added

  • Single section storage classes with support for automatic diffing.

    SingleSectionStorage classes are now a recommended way of handling items in single section in more powerful way than MemoryStorage class.

    Read more about it in README.

  • Support for Swift 4.2 and Xcode 10.

  • Convenience methods for conditional mappings and anomalies

    • Method to create MappingCondition from ModelTransfer objects
    • Ability to silence anomalies using enum or closure
DTModelStorage - 7.1.0

Published by DenTelezhkin over 6 years ago

Added

Changed

  • Support for Xcode 10 (beta 1) with Swift 4.1 and Swift 4.2.

Fixed

  • Crash that could happen if move operation for MemoryStorage happened from and to the same section with not enough items in section.
DTModelStorage - 7.0.3

Published by DenTelezhkin over 6 years ago

  • Updates for Xcode 9.3 and Swift 4.1
DTModelStorage - 7.0.2

Published by DenTelezhkin over 6 years ago

  • Properly collect all updates from updateWithoutAnimations block.
DTModelStorage - 7.0.1

Published by DenTelezhkin over 6 years ago

  • Fixed a bug, that prevented datasource from being updated when updateWithoutAnimations method on MemoryStorage was used.
DTModelStorage - 7.0.0

Published by DenTelezhkin over 6 years ago

DTModelStorage - 7.0.0-beta.1

Published by DenTelezhkin almost 7 years ago

  • Implemented mechanism for deferring datasource updates of MemoryStorage. When turned on, updates are no longer applied automatically, but can be applied calling StorageUpdate.applyDeferredDatasourceUpdates() method. Keep in mind, that not only datasource updates are not applied, but object and section changes are also empty until updates are applied. This behaviour is turned on by default, to disable it, call
MemoryStorage.defersDatasourceUpdates = false
  • Ream podspec now requires Realm version 3.x
DTModelStorage - 6.0.0

Published by DenTelezhkin almost 7 years ago

  • Fixed warnings for Xcode 9.1 / Swift 4.0.2
DTModelStorage - 6.0.0-beta.2

Published by DenTelezhkin about 7 years ago

  • Build with Xcode 9.0 release.
DTModelStorage - 6.0.0-beta.1

Published by DenTelezhkin about 7 years ago

This is major release, containing breaking API changes, please read DTTableViewManager 6.0 Migration Guide

  • MemoryStorage now has a convenience method for moving item without animations: moveItemWithoutAnimation(from:to:).
  • EventReaction class now has 4 and 5 argument reactions
  • All storage protocols are now class-bound.
  • Implemented mapping conditions. ViewModelMapping was changed to be able to work with mapping blocks.

Breaking

  • RealmStorage is not included in Carthage releases.
  • setItems method, that accepted array of arrays of items to set items for all sections, has been renamed to setItemsForAllSections to provide more clarity and not to clash with setItems(_:forSection:) method.
DTModelStorage - 5.1.0

Published by DenTelezhkin over 7 years ago

  • Swift 3.2 support(Xcode 9 beta 1).
  • RealmStorage now accepts RealmCollection objects into section, thus allowing List and LinkingObjects to be used(previously only Results objects could be used in section).
DTModelStorage - 5.0.1

Published by DenTelezhkin over 7 years ago

  • Improved handling of NSFetchedResultsControllerDelegate NSFetchedResultsChangeType.update change type in cases, where object inserts/removal/moves is used simultaneously with object updates(#17).
DTModelStorage - 5.0.0

Published by DenTelezhkin over 7 years ago

  • Reworked EventReaction class to use ViewModelMapping to properly identify not only model and ViewType, but also viewClass. This allows event reactions to run for cases where two view subclasses, conforming to ModelTransfer, use the same model, and have similar events.
DTModelStorage - 4.1.0

Published by DenTelezhkin over 7 years ago

  • Adds setItems(_:) method, that allows to set items for all sections in MemoryStorage.
DTModelStorage - 4.0.0

Published by DenTelezhkin almost 8 years ago

  • StorageUpdate properties, that tracked changes independently of each other, have been replaced with objectChanges, sectionChanges arrays, that track all changes in order they occured
  • StorageUpdate now has updatedObjects dictionary, that allow tracking objects, that have been updated, along with corresponding indexPath. It is done because UITableView and UICollectionView defer cell updates after insertions and deletions are completed, and therefore shift indexPaths. For example, if you were to insert 0 item and update it, UITableView would think that you are updating 1 item instead of 0, because it happens in single animation block and 0 item becomes 1.
DTModelStorage - 3.0.0

Published by DenTelezhkin almost 8 years ago

No changes from previous betas.

DTModelStorage - 3.0.0-beta.3

Published by DenTelezhkin about 8 years ago

  • Requires Realm 2.0 and higher.
  • Fixes crash, that happens, when subscribing to Realm notifications and Realm is read-only(thanks, @augmentedworks!)
DTModelStorage - 3.0.0-beta.2

Published by DenTelezhkin about 8 years ago

  • Enables RealmStorage with RealmSwift dependency
DTModelStorage - 3.0.0-beta.1

Published by DenTelezhkin about 8 years ago

Swift 3.0 and higher is required for this version of framework.

Note. Beta 1 Does not include RealmStorage subspec due to RealmSwift.framework podspec issues

Reworked

  • UIReaction class has been replaced with new EventReaction class, that allows more flexible and powerful events usage
  • Supplementary models are now stored in [String:[Int:Any]] instead of [String:Any] to support supplementary models, whose position is determined by indexPath in UICollectionView. SupplementaryStorageProtocol, SupplementaryAccessible protocols have been reworked to reflect those changes.
  • MemoryStorageErrors have been made an Error type following conventions from SE-0112.

Added

  • MemoryStorage and RealmStorage now implement SectionLocationIdentifyable protocol, allowing any section to find out, what it's index is.
  • SectionModel and RealmSection gained currentSectionIndex property, that shows index of section in sections array.
  • displaySectionNameForSupplementaryKinds property on CoreDataStorage, that defines, for which supplementary kinds NSFetchedResultsController sectionName should be used as a data model.
  • removeItemsFromSection method on MemoryStorage, that allows to remove all items from specific section

Removed

  • itemForCellClass:atIndexPath:, itemForHeaderClass:atSectionIndex:, itemsForFooterClass:atSectionIndex:
  • makeNSIndexSet method, because Swift 3 allows to directly create IndexSet from both Array and Set.
DTModelStorage - 2.6.2

Published by DenTelezhkin over 8 years ago

Fixed

  • CoreDataStorage now properly updates new indexPath after Move event on iOS 9.
Package Rankings
Top 4.79% on Cocoapods.org
Top 26.55% on Carthage
Top 14.74% on Swiftpackageindex.com
Badges
Extracted from project README
codecov.io CocoaPods compatible Platform Swift Package Manager compatible Packagist
Related Projects