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.
-
IndexPathof expanded cell.Declaration
Swift
public var expandedIndexPath: IndexPath? -
Should cell change it’s state to
expandon tap. Default value:trueDeclaration
Swift
public var shouldExpand: Bool -
Represents view state.
See moreDeclaration
Swift
public enum State -
Current view state. Default value:
.normalDeclaration
Swift
public var state: ElongationPreview.ElongationViewController.State { get set }
-
Collapse expanded cell.
Declaration
Swift
public func collapseCells(animated: Bool = default)Parameters
animatedshould animate changing tableView’s frame.
-
Expand cell at given
IndexPath. View must be innormalstate.Declaration
Swift
public func expandCell(at indexPath: IndexPath)Parameters
indexPathIndexPath of target cell
-
Present modal view controller for cell at given
IndexPath.Declaration
Swift
open func openDetailView(for indexPath: IndexPath)Parameters
indexPathIndexPath of source cell.
-
Expand given
ElongationDetailViewControllerDeclaration
Swift
public func expand(viewController: ElongationDetailViewController, animated: Bool = default, completion: (() -> Void)? = default)Parameters
viewControllerElongationDetailViewControllersubclass which will be added to view hierarchy.animatedShould the transition be animated.
completionOptional callback which will be called when transition completes.
-
Must call
superif you override this method in subclass.Declaration
Swift
open override func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) -
Must call
superif you override this method in subclass.Declaration
Swift
open override func scrollViewDidScroll(_ scrollView: UIScrollView)
-
This transition object will be used while dismissing
ElongationDetailViewController.Declaration
Swift
public func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? -
This transition object will be used while presenting
ElongationDetailViewController.Declaration
Swift
public func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning?
ElongationViewController Class Reference