Je crée un UITableViewCell réutilisable personnalisé avec trois étiquettes et un imageView, et je les enlève dans la méthode dealloc de la cellule ... tout fonctionne bien mais le problème est le texte dans la cellule obtenant foncé tout en étant sélectionné. .. et il est une sorte de chevauchement sur l'autre aide-moi à éviter ce problème ...UITableViewCell Problème
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
{
NSLog(@"Address for cel called");
NameLbl = [[UILabel alloc] initWithFrame:CGRectMake(5,5,140,20)];
[self.contentView addSubview:NameLbl];
NameLbl.font =[UIFont fontWithName:@"Times New Roman" size:15];
NameLbl.font = [UIFont boldSystemFontOfSize:15];
NameLbl.opaque=YES;
NameLbl.tag = 1001;
AddressLbl = [[UILabel alloc] initWithFrame:CGRectMake(5,25,140,20)];
[self.contentView addSubview:AddressLbl];
AddressLbl.font =[UIFont fontWithName:@"Times New Roman" size:15];
AddressLbl.opaque=YES;
AddressLbl.tag = 1002;
CityStateZipLbl = [[UILabel alloc] initWithFrame:CGRectMake(5,50,150,20)];
[self.contentView addSubview:CityStateZipLbl];
CityStateZipLbl.opaque=YES;
CityStateZipLbl.tag = 1003;
CityStateZipLbl.font =[UIFont fontWithName:@"Times New Roman" size:15];
}
return self;
}
- (void)dealloc {
[CityStateZipLbl release];
[NameLbl release];
[AddressLbl release];
[super dealloc];
}
Balu, pour cette question, vous pouvez consulter ce lien http://stackoverflow.com/questions/4441579/scrollable-table-having-a -redraw-issue-doesnt-semble-être-effacer/4446714 # 4446714 – iPhoneDev