это возможно, но я думаю,
if (tableView=tableView1)
{
return [tableArr count];
}
if (tableView=tableView2)
{
return [tableArr count];
}
этот код должен быть в
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
а не в
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
и вы также установили ссылочный IBoutlet для соответствующего табличного представления, если добавили его из Интерфейсного разработчика ...?
Использование
[tableView isEqual: tableView1] / * вместо * / if (tableView = tableView1