Latest 0.2
Homepage https://github.com/arturjaworski/TableViewAutolayoutManager
License MIT
Platforms ios 8.0, requires ARC
Dependencies TableViewManager
Frameworks UIKit
Authors

Version
License
Platform

Description

Automatically takes care of custom UITableViewCell dynamic height. Written in Swift.

TableViewAutolayoutManager

Installation

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

pod "TableViewAutolayoutManager"

Quick Start

Before you use it

TableViewAutolayoutManager requires TableViewManager. Please see TableViewManager first.

Please be sure that you have to use this pod. In most cases self sizing cells is enough.

TableViewAutolayoutManager using UIView systemLayoutSizeFittingSize(_:) to calculate height.

Step 1

Do all steps described in TableViewManager. Remember that you don’t need to use enum if you don’t want to.

Step 2

Remember about import.

import TableViewAutolayoutManager
class ViewController: UIViewController, TableViewAutolayoutManager {
    // (...)
}

Step 3

Implemment tableView(_:heightForRowAtIndexPath:) as below.

extension ViewController: UITableViewDelegate {
    func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
        return self.tableViewAutolayoutManager(tableView, heightForRowAtIndexPath: indexPath)
    }

    // (...)
}

That’s all!

License

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

Latest podspec

{
    "name": "TableViewAutolayoutManager",
    "version": "0.2",
    "summary": "Dynamic custom UITableViewCell height based on autolayout.",
    "description": "Automatically takes care of custom UITableViewCell dynamic height. Written in Swift.",
    "homepage": "https://github.com/arturjaworski/TableViewAutolayoutManager",
    "license": "MIT",
    "authors": {
        "Artur Jaworski": "[email protected]"
    },
    "source": {
        "git": "https://github.com/arturjaworski/TableViewAutolayoutManager.git",
        "tag": "0.2"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "TableViewAutolayoutManager": [
            "Pod/Assets/*.png"
        ]
    },
    "frameworks": "UIKit",
    "dependencies": {
        "TableViewManager": []
    }
}

Pin It on Pinterest

Share This