iPad - More than one UITableView in the same screen

后端 未结 2 1342
天命终不由人
天命终不由人 2020-12-03 06:05

I coding app from iPad and I have to put two separate UITableView in the same screen. For this app I can´t put the UITableView and divid in two sections for requisits reason

2条回答
  •  孤城傲影
    2020-12-03 06:42

    Yes, you can make different classes for datasource and delegate methods for different UITableView and in-fact this is the best approach for using multiple tables on same view as this approach implements MVC architecture. For this try these 2 solutions in which first approach is for implementing 2 tables datasource and delegate method in same class and second is to implement different datasource and delegate method in different classes either by using UITableViewController or NSObject class

    For more detail try these links where you can find sample code too:

    Handle more than one table in a View Part-1

    Handle more than one table in a View Part-2

提交回复
热议问题