2011-08-22 71 views

回答

2
if (cell == nil) { 

     cell = [[[UITableViewCell alloc] initWithStyle:............... 



      UILabel *durationLabel =[[UILabel alloc]initWithFrame:CGRectMake(250,12 , 60,20)]; 



      durationLabel.textColor = [UIColor blueColor]; 

      durationLabel.backgroundColor =[UIColor clearColor]; 


      durationLabel.tag=55; 

      [cell.contentView addSubview:durationLabel]; 

      [durationLabel release]; 


    } 


      UILabel *label=(UILabel*)[cell.contentView viewWithTag:55]; 

      label.text = @"vijay"; 
+0

無論如何,我需要添加新標籤?有像cell.delailedLabel這樣的標籤嗎? –

+0

nope ........... –

+0

謝謝你:) –