UITableViewCell Problem....
Posted
by
balu
on Stack Overflow
See other posts from Stack Overflow
or by balu
Published on 2010-12-29T04:21:39Z
Indexed on
2010/12/29
5:53 UTC
Read the original article
Hit count: 264
iphone
|iphone-sdk-4.0
Hi friends... i am creating a Custom reusable UITableViewCell with Three labels and one imageView,and i am removing them in cell's dealloc method... all is working fine but the problem is the text in cell getting Dark while selected... it and it is kind of overlapping on each other help me to avoid that problem...
- (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];
}
© Stack Overflow or respective owner