How to use

ElongationViewController

Then subclass ElongationViewController and configure it as you wish.

classRootViewController: ElongationViewController { }

Now you must register reusable cell in tableView. If you prefer to use Storyboards, you can drag UITableViewCell from bottom-right menu, lay it out and change it's class to ElongationCell. Of course, there are some specific requirements on how you can configure cell's subviews.

ElongationCell

Easier way: copy DemoElongationCell from demo project and change it as you wish. Add your own views to top, bottom and scalable containers.

If you want to create cell from scratch, this is how your cell hierarchy should look like:

Required properties:

bottomView — the view which comes from behind the cell when you tap on the cell.

scalableView — the view which will be scaled when you tap on the cell.

topView — static top view, add here all the views which won't be scaled and must stay on their position.

Also you must connect this constraints: topViewHeightConstraint, topViewTopConstraint, bottomViewHeightConstraint, bottomViewTopConstraint.