可以的,在代理方法上区分一下就好,如:
if ([tableView isEqual:tableView1])
{
static NSString * identity1 = @"_cell1";
UITableViewCell * cell1 = [tableView dequeueReusableCellWithIdentifier:identity1];
if (!cell1)
{
cell1 = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:identity1];
}
return cell1;
}
if ([tableView isEqual:tableView2])
{
static NSString * identity2 = @"_cell2";
UITableViewCell * cell2 = [tableView dequeueReusableCellWithIdentifier:identity2];
if (!cell2)
{
cell2 = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:identity2];
}
return cell2;
}