0
lorsque j'ai sélectionné la ligne, modifier les backgroundimages?Comment changer l'image de fond de tableviewcell?
lorsque j'ai sélectionné la ligne, modifier les backgroundimages?Comment changer l'image de fond de tableviewcell?
Définissez le selectedBackgroundView
de UITableViewCell
à votre vue personnalisée.
#define kCellHeight 50 //Replace '50' with Height of your UITableViewCell
#define kSelectedCellBackgroundImage @"nameOfYourImage" //replace value inside "" with name of your image
UIImageView *selectedBackgroundView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 320, kCellHeight)];
[selectedBackgroundView setImage:[UIImage imageNamed:kSelectedCellBackgroundImage]];
[cell setSelectedBackgroundView:selectedBackgroundView];
[selectedBackgroundView release];
PhraseSelectedCellViewController * phrView = [[PhraseSelectedCellViewController alloc] initWithFrame: CGRectMake (0, 0, 320, 60)]; [cell.contentView addSubview: phrView]; cell.selectedBackgroundView = phrView; \t [version de phrCom]; est ok? – raien
Je l'ai fait. Merci – raien