Multiple UITableview in Single Viewcontroller

后端 未结 5 1906
無奈伤痛
無奈伤痛 2020-12-09 10:16

I have a viewcontroller in that i want to show 3 tableviews(because the content and the table properties are different). How do i add these delegat

5条回答
  •  忘掉有多难
    2020-12-09 11:14

    //add tag in tableView .
    myTable1.tag = 200;
    myTable2.tag = 201;
    myTable3.tag = 202;
    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
    {
    if (tableView.tag == 200)
    {
        return 1;
    }
    if (tableView.tag == 201)
    {
        return 1;
    }
    if (tableView.tag == 202)
    {
        return 1;
    }
    
    
    }
    

提交回复
热议问题