Latest 0.9.0
Homepage https://github.com/PendarLabs/PLDataSource
License MIT
Platforms ios 7.0, requires ARC
Authors

CI Status
Version
License
Platform

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

A series of UITableViewDataSource classes to make it easy to slice and dice your data any which way you need.

The PLDataSource class provides a unified interface for all table view data sources. The two concrete subclasses provide easily-customizable behaviour (one for displaying simple lists and another for using an NSFetchedResultsController). Create your own data sources by subclassing one of concrete implementations and overriding tableView:configureCell:forObject:atIndexPath: along with registeredCellReuseIdentifierForRowAtIndexPath:.

All data sources inform their delegates of changes using the PLDataSourceDelegate protocol. PLTableViewController conforms to this protocol. Make your view controllers inherit from it and override initializeDataSources to get all data source functionality for free.

PLBasicDataSource

A subclass of PLDataSource that simply takes an array of items and uses it to populate a single-section table view. Changes to this array can be intelligently animated, assuming the objects respond to isEqual: appropriately.

PLFetchedResultsDataSource

A sublcass of PLDataSource that wraps an NSFetchedResultsController. Your custom subclass should override defaultFetchRequest.

PLMergedDataSource

A subclass of PLDataSource that merges the results of several other data sources. Each of its "child" data sources is assumed to manage a single section in a table view. This is handy if you use Core Data and would like to use NSFetchedResultsController to show different entities in different sections of a table view.

Installation

PLDataSource is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "PLDataSource"

Author

Hirad Motamed, [email protected]

License

PLDataSource is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "PLDataSource",
    "version": "0.9.0",
    "summary": "Table view data source classes to make presentation of non-trivial tables easier.",
    "description": "PLDataSource is a collection of classes that make it easier to build a non-trivial data source for a UITableView. The original motivation was to list different Core Data entities in one table easily, using NSFetchedResultsController. But the structure can be extended to many other use-cases.",
    "homepage": "https://github.com/PendarLabs/PLDataSource",
    "license": "MIT",
    "authors": {
        "Hirad Motamed": "[email protected]"
    },
    "source": {
        "git": "https://github.com/PendarLabs/PLDataSource.git",
        "tag": "0.9.0"
    },
    "social_media_url": "https://twitter.com/thehirad",
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "PLDataSource": [
            "Pod/Assets/*.png"
        ]
    },
    "public_header_files": "Pod/Classes/**/*.h"
}

Pin It on Pinterest

Share This