0

I am new to iOS, and would love some help on this. I have an application which has a side menu that contains more than 20 items in a tableview. But, I want to hide the last 5 items in the same view.

When I click on MORE the remaining items are shown, and it will change to LESS. Please see the screenshots below.

enter image description here

enter image description here

Thanks in advance.

Luuklag
  • 3,897
  • 11
  • 38
  • 57
  • You need to make some action which identify that less is click or show all option click, based on that you need to change in numberOfRow. – Hardik Thakkar Jul 13 '18 at 12:29
  • please have a look into the good article https://www.anexinet.com/blog/expandable-collapsible-uitableview-sections/ – Vinodh Jul 13 '18 at 14:20

1 Answers1

0

You can create one section with section header as more or less button, and on button action you just insert or remove the number of rows in that section. If you need any more help let me know.

vivekDas
  • 1,248
  • 8
  • 12