Change table View when a control is segmented. Just like in APPSTORE app. How to do it?

I have a SampleViewController in which a segmentedControl is added at the top below the navigation bar (not inside it). Now, under the segment controller, I want a tableView that loads from another CommonTableViewController class. When a segment is used, a new tableView from the same CommonTableViewController must be loaded. How can I do that? thanks in advance.

+3
source share
2 answers

I am using an array to populate a tableView table ...

segmentedControlClicked... , , :

[self.tableView reloadData];
+1

2 UITableViews, . LIKE

[tableView1 removeFromSuperview];
[self.view indertSubview:tableView2 atIndex:self.view.subviews.count];

, , tableView .

+1

Source: https://habr.com/ru/post/1728805/


All Articles