i’d like to stack two UITableViews in a single view. i can do this in interface builder, however, i would like to do this programmatically in code.
in my main UIViewController, i create two UITableViewControllers in my viewDidLoad method.
i thought at first i could do this by:
[self.view addSubView:controller1.view];
[self.view addSubView:controller2.view];
but this only shows the 2nd view. i’ve also tried:
[self.view addSubview:controller1.view];
[controller1.view addSubview:controller2.view];
but it still doesn’t do what interface builder did above.
UPDATE
i want to accomplish this:
which i did in interface builder:
but in code.
What is the reason to create two UITableViewControllers? Simply create two UITableView objects and manipulate them.