ExpandingTableView 1.0.1

ExpandingTableView 1.0.1

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Jun 2015
SPMSupports SPM

Maintained by József Vesza.



ExpandingTableView

Framework for expanding table view cells.

What is this?

Table view infrastructure supporting expanding cells.

Installation

Usage

Basics

Supporting expanding cells is really simple, just follow these two steps:

  1. Your table view cell has to be a sublass of ExpandingTableViewCell. Additionally you must connect the following outlets:

    • mainContainerView: will contain your primary view, which is always visible.
    • detailContainerView: the expanding part of your cell.
    • detailViewHeightConstraint: the height constraint of the expanding part.
  2. Your table view controller has to be a subclass of ExpandingTableViewController, which will handle the initial setup, and manage the expanding behavior by default.

You can dequeue cells the following way:

override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {

    let cell = super.tableView(tableView, cellForRowAtIndexPath: indexPath) as! ExampleCell

    // customize cell here.

    return cell
}

Further details

For a complete walkthrough, see the included example project.

Internals

For the details, see the original project.