Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TableViewAutolayoutManager

Version License Platform

Description

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

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.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages