ElongationViewController

open class ElongationViewController : SwipableTableViewController

UITableViewController subclass.

This is the root view controller which displays vertical stack of cards. Each card in stack can be expanded.

  • IndexPath of expanded cell.

    Declaration

    Swift

    public var expandedIndexPath: IndexPath?
  • Should cell change it’s state to expand on tap. Default value: true

    Declaration

    Swift

    public var shouldExpand: Bool
  • Represents view state.

    See more

    Declaration

    Swift

    public enum State
  • Current view state. Default value: .normal

    Declaration

    Swift

    public var state: ElongationPreview.ElongationViewController.State { get set }
  • Collapse expanded cell.

    Declaration

    Swift

    public func collapseCells(animated: Bool = default)

    Parameters

    animated

    should animate changing tableView’s frame.

  • Expand cell at given IndexPath. View must be in normal state.

    Declaration

    Swift

    public func expandCell(at indexPath: IndexPath)

    Parameters

    indexPath

    IndexPath of target cell

  • Present modal view controller for cell at given IndexPath.

    Declaration

    Swift

    open func openDetailView(for indexPath: IndexPath)

    Parameters

    indexPath

    IndexPath of source cell.

  • Declaration

    Swift

    public func expand(viewController: ElongationDetailViewController, animated: Bool = default, completion: (() -> Void)? = default)

    Parameters

    viewController

    ElongationDetailViewController subclass which will be added to view hierarchy.

    animated

    Should the transition be animated.

    completion

    Optional callback which will be called when transition completes.

  • Must call super if you override this method in subclass.

    Declaration

    Swift

    open override func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath)
  • Must call super if you override this method in subclass.

    Declaration

    Swift

    open override func scrollViewDidScroll(_ scrollView: UIScrollView)