Skip to content

Releases: DenTelezhkin/DTTableViewManager

6.1.0-beta.1

04 Dec 12:30
Compare
Choose a tag to compare
  • Implemented new system for deferring datasource updates until performBatchUpdates block. This system is intended to fight crash, that might happen when performBatchUpdates method is called after UITableView.reloadData method(for example after calling memoryStorage.setItems, and then immediately memoryStorage.addItems). This issue is detailed in DenTelezhkin/DTCollectionViewManager#27 and DenTelezhkin/DTCollectionViewManager#23. This crash can also happen, if iOS 11 API UITableView.performBatchUpdates is used. This system is turned on by default. If, for some reason, you want to disable it and have old behavior, call:
manager.memoryStorage.defersDatasourceUpdates = false
  • TableViewUpdater now uses iOS 11 performBatchUpdates API, if this API is available. This API will work properly on MemoryStorage only if defersDatasourceUpdates is set to true - which is default. However, if for some reason you need to use legacy methods beginUpdates, endUpdates, you can enable them like so:
manager.tableViewUpdater?.usesLegacyTableViewUpdateMethods = true

Please note, though, that new default behavior is recommended, because it is more stable and works the same on both UITableView and UICollectionView.

  • tableViewUpdater property on DTTableViewManager is now of TableViewUpdater type instead of opaque StorageUpdating type. This should ease use of this object and prevent type unneccessary type casts.

6.0.0

01 Nov 13:19
Compare
Choose a tag to compare
  • Updated to Xcode 9.1 / Swift 4.0.2

6.0.0-beta.3

05 Oct 15:19
Compare
Choose a tag to compare
  • Makes DTTableViewManager property weak instead of unowned to prevent iOS 10-specific memory issues/crashes.

6.0.0-beta.2

27 Sep 15:18
Compare
Choose a tag to compare
  • Build with Xcode 9.0 final release.
  • Fixed partial-availability warnings.

6.0.0-beta.1

10 Sep 17:53
Compare
Choose a tag to compare

This is a major release with some breaking changes, please read DTTableViewManager 6.0 Migration Guide

  • Added updateVisibleCells(_:) method, that allows updating cell data for visible cells with callback on each cell. This is more efficient than calling reloadData when number of elements in UITableView does not change, and only contents of items change.
  • Implement configureEvents(for:_:) method, that allows batching in several cell events to avoid using T.ModelType for events, that do not have cell created.
  • Added event for UITableViewDelegate tableView(_:targetIndexPathForMoveFromRowAt:toProposedIndexPath:
  • Added events for focus engine on iOS 9
  • Added events for iOS 11 UITableViewDelegate methods: tableView(_:leadingSwipeActionsConfigurationForRowAt:, tableView(_:trailingSwipeActionsConfigurationForRowAt:, tableView(_:shouldSpringLoadRowAt:withContext:
  • UITableViewDelegate and UITableViewDatasource implementations have been refactored from DTTableViewManager to DTTableViewDelegate and DTTableViewDataSource classes.
  • DTTableViewManager now allows registering mappings for specific sections, or mappings with any custom condition.
  • Added move(_:_:) method to allow setting up events, reacting to tableView:moveRowAt:to: method.

Breaking

  • Signature of move(_:_:) method has been changed to make it consistent with other events. Arguments received in closure are now: (destinationIndexPath: IndexPath, cell: T, model: T.ModelType, sourceIndexPath: IndexPath)
  • tableView(UITableView, moveRowAt: IndexPath, to: IndexPath) no longer automatically moves items, if current storage is MemoryStorage. Please use MemoryStorage convenience method moveItemWithoutAnimation(from:to:) to move items manually.

Deprecated

  • Error handling system of DTTableViewManager is deprecated and can be removed or replaced in future versions of the framework.

5.3.0

06 Apr 15:09
Compare
Choose a tag to compare
  • Use new events system from DTModelStorage, that allows events to be properly called for cells, that are created using ViewModelMappingCustomizing protocol.

5.2.0

29 Jan 09:21
Compare
Choose a tag to compare

New

  • Setting TableViewUpdater instance to tableViewUpdater property on DTTableViewManager now triggers didUpdateContent closure on TableViewUpdater.
  • Added sectionIndexTitles event to replace UITableViewDataSource.sectionIndexTitles(for:) method.
  • Added sectionForSectionIndexTitle event to replace UITableViewDataSource.tableView(_:sectionForSectionIndexTitle:at) method.

Bugfixes

  • All events that return Optional value now accept nil as a valid event result.
  • didDeselect(_:,_:) method now accepts closure without return type - since UITableViewDelegate does not have return type in that method.

5.1.0

28 Oct 14:54
Compare
Choose a tag to compare

Dependency changelog -> DTModelStorage 4.0.0 and higher

  • TableViewUpdater has been rewritten to use new StorageUpdate properties that track changes in order of their occurence.
  • TableViewUpdater reloadRowClosure and DTTableViewManager updateCellClosure now accept indexPath and model instead of just indexPath. This is done because update may happen after insertions and deletions and object that needs to be updated may exist on different indexPath.

5.0.0

23 Oct 13:29
Compare
Choose a tag to compare

No changes from previous beta.

5.0.0-beta.3

13 Oct 11:04
Compare
Choose a tag to compare
5.0.0-beta.3 Pre-release
Pre-release
  • DTModelStorage dependency now requires Realm 2.0
  • UITableViewDelegate heightForHeaderInSection and heightForFooterInSection are now properly called on the delegate, if it implements it(thanks, @augmentedworks!).