Open Source Library For Visualizing Table View And Collection View Changes With Animations

One of the issues with updating results in a table view or collection view is that it can be difficult to visualize to the user exactly what has changed.

Here’s an open source library that makes it easier to visualize changes to a UITableView or UICollectionView called Doppelganger submitted by Sasha Zats.

To use Doppelganger you take your old datasource and provide the new datasource to the library choose how you’d like to animate the changes.

This source code example from the readme shows how it’s done:

NSArray *oldDataSource = self.dataSource;
self.dataSource = [self _updatedDataSource];
NSArray *diffs = [WMLArrayDiffUtility diffForCurrentArray:self.dataSource
                                            previousArray:oldDataSource];
[self.tableView wml_applyBatchChanges:array
                            inSection:0
                     withRowAnimation:UITableViewRowAnimationRight];

This animation shows the included Doppleganger example in action:
Doppelganger

You can find Doppelganger on Github here.

A nice library to make it easier for the user to pick up on updated table view and collection view content.

Original article: Open Source Library For Visualizing Table View And Collection View Changes With Animations

©2015 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

Leave a Reply

Your email address will not be published. Required fields are marked *