AEAccordionTableViewController

This class is used for accordion effect in UITableViewController.

Just subclass it and implement tableView:heightForRowAtIndexPath: (based on information in expandedIndexPaths property).

  • Array of NSIndexPath objects for all of the expanded cells.

    Declaration

    Swift

    public var expandedIndexPaths = [NSIndexPath]()
  • Expand or collapse the cell.

    Declaration

    Swift

    public func toggleCell(cell: AEAccordionTableViewCell, animated: Bool)

    Parameters

    cell

    Cell that should be expanded or collapsed.

    animated

    If true action should be animated.

  • AEAccordionTableViewController will set cell to be expanded or collapsed without animation.

    Tells the delegate the table view is about to draw a cell for a particular row.

    Declaration

    Swift

    public override func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath)

    Parameters

    tableView

    The table-view object informing the delegate of this impending event.

    cell

    A table-view cell object that tableView is going to use when drawing the row.

    indexPath

    An index path locating the row in tableView.

  • AEAccordionTableViewController will animate cell to be expanded or collapsed.

    Tells the delegate that the specified row is now deselected.

    Declaration

    Swift

    public override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath)

    Parameters

    tableView

    A table-view object informing the delegate about the row deselection.

    indexPath

    An index path locating the deselected row in tableView.