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