Vistas de contenido de UITableViewCell superpuestas

Tengo esta tabla cuyas celdas se ven así:
Como puede ver, se supone que el borde superior de cada celda se superpone con la celda de arriba. En este momento, este borde es parte del fondo (sin superposición hasta ahora).

Ahora, he separado el borde del fondo y el código de creación de mi celda se ve así:

<code>#define QAImage(NAME) [[[UIImageView alloc] initWithImage:[UIImage imageNamed:NAME]] autorelease]

- (UITableViewCell*) tableView:(UITableView*)table cellForRowAtIndexPath:(NSIndexPath*)index
{
    UITableViewCell *cell = [table dequeueReusableCellWithIdentifier:@"Entry"];
    if (cell == nil)
    {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
                                         reuseIdentifier:@"Entry"] autorelease];
        cell.backgroundView = QAImage(@"bg-cell.png");
        cell.selectedBackgroundView = QAImage(@"bg-cell-sel.png");
        cell.selectionStyle = UITableViewCellSelectionStyleGray;
        UIImageView *img = QAImage(@"disclosure.png");
        img.highlightedImage = [UIImage imageNamed:@"disclosure-sel.png"];
        cell.accessoryView = img;
        CGRect r = cell.frame;
        r.size.height = table.rowHeight;
        r.size.width = table.frame.size.width;
        cell.frame = r;
        r = cell.contentView.frame;
        r.origin = CGPointMake(13, 13);
        r.size.width -= 8 + img.frame.size.width;
        r.size.height -= 25;
        [cell.contentView addSubview:[[[TagView alloc] initWithFrame:r] autorelease]];
        img = QAImage(@"cell-top.png");
        img.highlightedImage = [UIImage imageNamed:@"cell-top-sel.png"];
        img.opaque = NO;
        r = img.frame;
        r.origin = CGPointMake(0, 1 - r.size.height); // The (supposed) overlapping happens here.
        img.frame = r;
        cell.contentView.clipsToBounds = NO;
        [cell.contentView addSubview:img];
    }
    // Here I set the title. (omitted)
    return cell;
}
</code>

El problema es,el borde solo se muestra cuando estoy desplazándome hacia arriba en la tabla, de lo contrario, se superpone a sí mismo por la celda por encima de ella. (Al revés.)

He intentado[cell setNeedsDisplay] en-tableView:willDisplayCell:forRowAtIndexPath:, añadiendo el borde (cell-top.png) cada vez que se solicita una celda (lo que obviamente conduce a múltiples dibujos y no se ve bien; a pesar de eso, todavía no resuelve mi problema) y la configuraciónimg.layer.zPosition = 2.

¿Cómo puedo obligar a que UIImageView permanezca en la cima todo el tiempo?

Respuestas a la pregunta(1)

Su respuesta a la pregunta