sous-classé UITableViewCell - backgroundView couvre tout ce que je fais dans drawRect

Je suis en train de faire un sous-classé UITableViewCell où je dessine une image dans le coin supérieur droit. J'ai il fonctionne parfaitement sauf que quand j'ai mis l'auto.backgroundView, mon image d'arrière-plan couvre l'image dessinée dans drawRect.

Il doit y avoir un moyen d'être en mesure de définir une image d'arrière-plan (et la selectedBackgroundView) sans couvrir jusqu'à ce qui se fait dans drawRect.

Je suis aller sur ce de la mauvaise façon?

EDIT: j'ai posté un exemple de projet avec le problème.

    - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {

    if ((self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])) {

     //TODO: figure out why this covers up self.starImage that's drawn in drawRect
         self.backgroundView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"cellBackground.png"]] autorelease];
    }
    return self;
}

- (void)drawRect:(CGRect)rect {
    [self.starImage drawAtPoint:CGPointMake(self.bounds.size.width - self.starImage.size.width, 0.0)];
}

EDIT 2: au AWrightIV demande, voici comment je l'ai eu de travail... qui n'a pas besoin de sous-classement UITableViewCell à tous. Je suis juste en ajoutant une sous-vue à la cellule.backgroundView:

//create a UIImageView that contains the background image for the cell
UIImageView *bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"cellBackground.png"]];

//create another UIImageView that contains the corner image
UIImage *starRedImage = [UIImage imageNamed:@"starcorner_red.png"];
UIImageView *starImageView = [[UIImageView alloc] initWithFrame:CGRectMake(297,
                                                                               0,
                                                                               starRedImage.size.width,
                                                                               starRedImage.size.height)];
starImageView.image = starRedImage;

//add the corner UIImageView as a subview to the background UIImageView
[bgImageView addSubview:starImageView];

//set cell.background to use the background UIImageView
cell.backgroundView = bgImageView;
InformationsquelleAutor Jim Rhoades | 2010-08-20