Latest 0.5.3
Homepage https://github.com/adamcumiskey/Sorcery
License MIT
Platforms ios 8.0
Authors

Version
License
Platform

Conjure tables and collections out of thin air

Introduction

A DataSource is an embedded DSL for construcing UIs with UITableViews and UICollectionViews.
You define the structure of your list and DataSource will automatically conform to UITableViewControllerDataSource, UITableViewControllerDelegate, UICollectionViewControllerDataSource, and UICollectionViewControllerDelegate.

For example, this is how you can create a simple UITableViewController:

let vc = BlockTableViewController(
    style: .grouped,
    dataSource: DataSource(
        sections: [
            Section(
                items: [
                    Item { (cell: BedazzledTableViewCell) in
                        cell.titleLabel.text = "Custom cells"
                    },
                    Item { (cell: SubtitleTableViewCell) in
                        cell.textLabel?.text = "Load any cell with ease"
                        cell.detailTextLabel?.text = "Sorcery automatically registers and loads the correct cell by using the class specified in the configure block."
                        cell.detailTextLabel?.numberOfLines = 0
                    }
                ]
            )
        ],
        middleware: [
            Middleware.noCellSelectionStyle,
            Middleware.separatorInset(UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0))
        ]
    )
)

Installation

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

pod "Sorcery"

Author

Adam Cumiskey, [email protected]

License

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

Latest podspec

{
    "name": "Sorcery",
    "version": "0.5.3",
    "summary": "Conjure UITableViews and UICollectionViews out of thin air",
    "description": "Sorcery is an embedded DSL for declaratively constructing UITableViews and UICollectionViews.",
    "homepage": "https://github.com/adamcumiskey/Sorcery",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Adam Cumiskey": "[email protected]"
    },
    "source": {
        "git": "https://github.com/adamcumiskey/Sorcery.git",
        "tag": "0.5.3"
    },
    "platforms": {
        "ios": "8.0"
    },
    "swift_version": "4.0",
    "source_files": "Sorcery/Classes/**/*"
}

Pin It on Pinterest

Share This