I have a `UITableView` that has 2 different custom `UITableViewCell` with 2 different unique identifiers.

I load the first custom `UITableViewCell` on `Load` and then the second custom `UITableViewCell` on `Cell Select`. 

I know that my problem is related to the way I am reusing my Cells. But I've tried using 

`routineSearchSelectedResultCell * cell = (routineSearchSelectedResultCell*)[tableView dequeueReusableCellWithIdentifier:nil];` and the result is that the new `UITableViewCell` is empty and the properties do not get populated. 

I've also tried `[[[cell contentView] subviews] makeObjectsPerformSelector: @selector(removeFromSuperview)];` but give me the same results.

How could I go around this problem??

```
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{

    if (idp && idp.row == indexPath.row  ) {
        return [self tableViewRoutineSelectedResult:tableView cellForRowAtIndexPath:indexPath];
    }

    NSString *cellIdentifier = @"routineSearchCell";
    routineSearchCell * cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];

    if (!cell) {
        cell = [[routineSearchCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellIdentifier];
    }

    cell.routineName.text = _myDownloadedInfo[@"routines"][indexPath.row][@"routine"][@"routineName"];
    cell.routineAuthor.text = _myDownloadedInfo[@"routines"][indexPath.row][@"routine"][@"username"];

    return cell;

}
- (routineSearchSelectedResultCell *)tableViewRoutineSelectedResult:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    NSDictionary* myRoutine = _myDownloadedInfo[@"routines"][indexPath.row][@"routine"];

    [self sortOutRoutineImages:myRoutine[@"routineType"]];

    NSString *cellIdentifier = @"routineSearchSelectedResultCell";
    routineSearchSelectedResultCell * cell = (routineSearchSelectedResultCell*)[tableView dequeueReusableCellWithIdentifier:cellIdentifier];
    if (!cell) {
        cell = [[routineSearchSelectedResultCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellIdentifier];
    }

    cell.label1.text =@"test";
    cell.contentView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"BlackGradientSearch"]];
    cell = [self iconRoutineImagesController:cell];
    cell.imgInstruction.image = [UIImage imageNamed:@"InstructionSearchWhite"];
    cell.imgVideos.image = [UIImage imageNamed:@"VideoSearchWhite"];
    cell.routineName.text = myRoutine[@"routineName"];
    [cell.download setBackgroundImage:[UIImage imageNamed:@"DownloadSearchWhite"] forState:UIControlStateNormal];
    return cell;
}
- (void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{

    if ( idp ) {
        NSIndexPath* pIdp = [[NSIndexPath alloc] init];
        pIdp = idp;
        idp = indexPath;
        [tableView beginUpdates];
        [tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationLeft];
        [tableView reloadRowsAtIndexPaths:@[pIdp] withRowAnimation:UITableViewRowAnimationRight];
        [tableView endUpdates];
    } else {
        idp = [[NSIndexPath alloc]init];
        idp = indexPath;
        [tableView beginUpdates];
        [tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationLeft];
        [tableView endUpdates];
    }

}

```

![](https://i.stack.imgur.com/B5tTn.png)