-1

I have got two tables one below another in my application.Both the tables must be Expandable and Collapsible. The headers of both the table are visible when both the tables are in collapsible mode.On click of the header of My first table I have to expand my first Table. On expanding my first table, the header of the second table must be visible but when i click on the header of my second table,My second table must take the complete screen and no other UI other than the header and rows of the second table must be visible and again on collapsing the second table the normal UI which was there before expanding second table must appear.

Kindly help me in achieving this scenario.

TIA :)

  • Possible duplicate of [Expand/collapse section in UITableView](http://stackoverflow.com/questions/1938921/expand-collapse-section-in-uitableview) – Max MacLeod Nov 03 '15 at 08:51

2 Answers2

0

Sounds like changing the frames of the table views is what you are after.

For instance for a tableview to take up the entire view:

self.tableView.frame = CGRectMake(self.tableView.frame.origin.x, self.view.frame.origin.y, self.tableView.frame.size.width, self.view.frame.size.height);
Adam Johnson
  • 2,198
  • 1
  • 17
  • 23
0

you should use the UIView class animation [UIView animation:(^animation)animation withDuration:(time)duration] method and resize your tableview frames when the user click on the table view. I believe you should try to put a button in the section headers of your table view that will resize both table views and go on from there.

Nicolas Manzini
  • 8,379
  • 6
  • 63
  • 81