override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
switch indexPath.row {
case 0:
// Сделать что-то по нажатию на ячейку с индексом 0
break
case 1:
// Сделать что-то по нажатию на ячейку с индексом 1
break
default:
break
}
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell2" forIndexPath:indexPath];
cell.textLabel.text = model1[indexPath.row];
// Configure the cell...
return cell;
}