Я хочу определить статическое табличное представление с одним динамическим разделом
Это возможно?
секция 0 должна быть статической, этикетки помечены в xcode с выходами.
раздел 1 должен быть динамическим
Я пробовал это, но я не знаю, какую ячейку я верну для статической части.
static NSString *CellIdentifier = @"ItemCellBasic";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
switch (indexPath.section)
{ case 0:
return // I don´t know what
case 1:
cell.textLabel =@"dynamic";
return cell;
}
РЕДАКТИРОВАТЬ 1;
сейчас я попробовал:
case 0: return [super tableView:tableView cellForRowAtIndexPath:indexPath];
но получил:
*** Assertion failure in -[UITableView _createPreparedCellForGlobalRow:withIndexPath:], /SourceCache/UIKit_Sim/UIKit-1912.3/UITableView.m:6072
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath:'