0
У меня есть UITableView
, что у меня есть настройка с двумя разделами. В приведенном ниже коде показан один и тот же текст ячейки по всему UITableView. Мой вопрос вкратце: как вы назначаете разделы NSArrays
?UITableView - назначение массивов в правые секции в UITableView
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [toStartPicker dequeueReusableCellWithIdentifier:@"cell"];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"cell"];
}
cell.textLabel.text= [nameJan objectAtIndex:indexPath.row];
cell.detailTextLabel.text= [subTitlesJan objectAtIndex:indexPath.row];
UITableViewCell *cellTwo = [toStartPicker dequeueReusableCellWithIdentifier:@"cellTwo"];
if (cellTwo == nil) {
cellTwo = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"cellTwo"];
}
cellTwo.textLabel.text= [nameFeb objectAtIndex:indexPath.row];
cellTwo.detailTextLabel.text= [subTitlesFeb objectAtIndex:indexPath.row];
return cell;
}
Спасибо большое за ответ! – Seb