Latest1.5
Homepagehttps://github.com/bigfish24/ABFRealmGridController
LicenseMIT
Platformsios 8.0, requires ARC
DependenciesSwiftFetchedResultsController, RealmSwift
Authors

ABFRealmGridController

The ABFRealmGridController is a UICollectionViewController subclass that binds data in Realm. The underlying UICollectionView will animate changes via use of RBQFetchedResultsController.

A Swift API that mirrors the Objective-C version is also available.

To use, simply subclass ABFRealmGridController in the same way as UICollectionViewController and set the entityName property to the Realm object class name you want to display. Similar to an UICollectionView implementation, you will need to implement the necessary UICollectionViewDelegate and UICollectionViewDataSource protocols.

Screenshot

The example application displays the current top stories from the New York Times. The app requests the stories for each section of the newspaper and adds the individual stories to Realm.

Grid of NYTimes Top Stories Backed By ABFRealmGridController

Installation

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

Objective-C

pod 'ABFRealmGridController'

Swift

pod 'RealmGridController'

Demo

Build and run/test the Example project in Xcode to see ABFRealmGridController in action. This project uses CocoaPods. If you don’t have CocoaPods installed, grab it with [sudo] gem install cocoapods.

Objective-C

git clone https://github.com/bigfish24/ABFRealmGridController.git
cd ABFRealmGridController/ABFRealmGridControllerExample
pod install
open ABFRealmGridController.xcworkspace

Swift

git clone https://github.com/bigfish24/ABFRealmTableViewController.git
cd ABFRealmTableViewController/SwiftExample
pod install
open SwiftRealmGridController.xcworkspace

Latest podspec

{
    "name": "RealmGridController",
    "version": "1.5",
    "summary": "Swift UICollectionViewController subclass that binds data in Realm",
    "description": "Swift UICollectionViewController subclass that adds data binding support for a Realm object model.",
    "homepage": "https://github.com/bigfish24/ABFRealmGridController",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Adam Fish": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/bigfish24/ABFRealmGridController.git",
        "tag": "v1.5"
    },
    "source_files": "RealmGridController/*.{swift}",
    "requires_arc": true,
    "dependencies": {
        "SwiftFetchedResultsController": [
            ">= 4.0.3"
        ],
        "RealmSwift": [
            ">= 0.100.0"
        ]
    }
}

Pin It on Pinterest

Share This