How to create multiple table views in the View controller for iPad?

I work with universal applications. Now I want to create three kinds of tables in my view controller for iPAD. I have three separate view controllers with XIB.So, how can I add two other table views as a subview in the main controllers. Please give me some examples of applications and links. In my application, I have three view controllers and adding a subview as a table (not a UITableViewController). When you click on the first data of the table view, it goes to the second table and clicks the data of the second table view, then goes to the third view of the table.

Hierarchy: MainViewController: --SubTableView1 --SubTableView2 

See image below. alt text

Please help me.

Thanks!!

+3
uitableview uiviewcontroller ipad
source share
3 answers

A table view is just a view you can use. It should not be attached to a 1: 1 view controller, but if it is not, you need to configure a custom single view controller that owns the screen, and then make it own all three table views as subzones. You need to be careful which object is the delegate and data source for each view, and do the right thing with the provision of cells, etc. If the same controller is the source of delegation / data of all kinds of tables, you need to switch delegate methods to do the right thing on each.

+4
source share

I wrote an example with two tables in one view . In my code, each TableView has its own controller, since I can avoid if else blocks in my delegate methods, as this will lead to a high and undesired connection.
These codes are very rude since I was a newbie when I wrote it. those. I do not use properties in it.
TableViews themselves can be added to their superview through Interface Builder.

+11
source share

I just finished the section of my application and I was able to do several tabular views on the same ipad display.

But the loan goes to another StackOverflow problem solving team. By reading this, I was able to identify the real problem and gave me the root of the answer. The problem with the main reasons is related to managing the data source and the TableView delegate with a separate controller ... You will need to carefully read the answer. I did, and my application now works well.

Here is the element: UITableView issue when using separate delegation / data source

+1
source share

All Articles