<commit_before>TLIndexPathTools
================

`TLIndexPathTools` is a set of components designed to greatly simplify the building
of rich, dynamic table and collection views. For example, `TLIndexPathTools`-driven table
can automatically perform batch updates (inserts, deletes, etc.) when the data model
changes. This is indeed similar to what `NSFetchedResultsController` can do except that
`TLIndexPathTools` is not tied to Core Data. `TLIndexPathTools` does, however, provide
a subclass of `NSFetchedResultsController` named `TLInMemoryFetchedResultsController`
that can perform batch updates for modified predicates and sort descriptors
(think animated sorting and filtering).

The system is based on a few basic concepts (references to table also apply to
collection unless otherwise noted):

- An instance of `TLIndexPathDataModel` represents a table's data model.
- Data models are created by passing an array of data items to `TLIndexPathDataModel`'s
initializer. Each data item corresponds to an index path. Items can be anything from
a list of strings, core data objects, or the `TLIndexPathItem` wrapper object for
heterogeneous data sets (as is typical with multiple cell prototypes).
- Every data item is assumed to have an identifier. This identifier is used by the
framework to compute batch updates from two data model instances (old and new). The
item itself can serve as the identifier (such as as with a string) or one can specify
an `identifierKeypath` (for example `objectID` with Core Data managed objects).
- `TLIndexPathDataModelUpdates` takes two versions of the data model and computes
the inserts, deletes, moves, and updates. Then the batch updates are performed
by calling either of
`TLIndexPathDataModelUpdates:performBatchUpdatesOnTableView:withRowAnimation:` or
`performBatchUpdatesOnCollectionView:collectionView`.

`TLIndexPathDataModel` provides several additional components:

- `TLTableViewController` is a base table view controller provided for quickly
integrating TLIndexPathDataModel into a project.

- `TLNoResultsTableDataModel` is a subclass of `TLTableViewController` that automatically
displays a "no result" message as a special row when there are no items.

- `TLInMemoryFetchedResultsController` is a subclass of `NSFetchedResultsController`
that uses an internal data model to report batch updates when predicates or
sort descriptors are modified. This allows for animated sorting and filtering UIs, which
the base `NSFetchedResultsController` cannot do.

- `TLCoreDataCollectionViewController` is a base collection view controller class for
integrating with `NSFetchedResultsController` (or `TLInMemoryFetchedResultsController`).<commit_msg>Start documenting after refactor<commit_after>TLIndexPathTools
================

`TLIndexPathTools` is a set of components designed to greatly simplify the building
of rich, dynamic table and collection views. Some awesome things you can do with
`TLIndexPathTools` include:

* Automatically calculate and perform animated batch updates
* Perform animated sorting and filtering operations against an `NSFetchRequest`
* Easily manage multiple cell prototypes and/or multiple data types as the data model changes

The central component of `TLIndexPathTools` is the `TLIndexPathController` class. This class
is a lot like Core Data's `NSFetchedResultsController` class in that it is responsible
for tracking a data source and reporting changes to the client. The big difference is that, while
`TLIndexPathController` does support `NSFetchRequest`, it does not require Core Data at all.
`TLIndexPathController` can just as easily work with an array of strings. For example, you can
initialize a `TLIndexPathController` with an array of strings to display as table rows and then
give the controller a new array of strings (perhaps a filtered or sorted version of the
original array) and the table will automatically animate to the new state.
See the "Shuffle" example project.

`TLIndexPathTools` provides base view controller classes `TLTableViewController` and
`TLCollectionViewController` for table and collection views, respectively, that implement the
essential delegate methods to get you up-and-running as quickly as possible.

Installation
------------

TODO
{'fraction_non_alphanumeric': 0.051209772140004696, 'fraction_numerical': 0.0, 'mean_word_length': 5.823717948717949, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '548388', 'n_tokens_mistral': 1022, 'n_tokens_neox': 989, 'n_words': 546}