Skip to content

Commit a781dd6

Browse files
committed
Update README.md
1 parent 819052a commit a781dd6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ios-swift-collapsible-table-section
1+
# iOS Collapsible Table Section
22
A simple iOS swift project demonstrates how to implement collapsible table section.
33

44
### Demo ###
@@ -37,6 +37,8 @@ sections = [
3737

3838
Select the `Table View` in the story board, choose `Dynamic Prototypes` and set `Prototype Cells` to `2`, one for the custom header and one for the row cell, and assign the `Identifier` to `header` and `cell` respectively.
3939

40+
![cell](screenshots/cell.png)<br />
41+
4042
Add a UIButton (the toggler) and a Label to the header prototype cell, create a swift file which extends `UITableViewCell` and name it `CollapsibleTableViewHeader.swift`. The file is super simple, it defines two IBOutlets for the toggle button and label. Finally set the header cell class to our custom header `CollapsibleTableViewHeader` and link the IBOutlets.
4143

4244
Now the file should look like this:

0 commit comments

Comments
 (0)