UITableView with Collapsible (expand and collapse) Cells
Oct 29, 2020
Many times we see the use-case like tableview cells should expand and collapse when tapped, let us see one easy implementation for the same in this article:
Let us create a TableViewController with a custom cell. The cell can be configured with three views
- Cell View — to display the cell contents in default mode
- Expanded View (Detail View) — to display the cell contents in expanded mode
- A container view (UIStackView) to hold both the Cell and Detail Views
So the CustomCell looks like this:
This article is updated and moved to my website here 😀 😀 😀