title: multiple labels in table cell...iphone
body: <p>i am new programmer of iphone App... i have 7 labels and 1 imageView in first cell of table view......</p>
  
  <p>i write this code for that..... this work satisfactory...(may be it take times when scroll)</p>
  
  <p>please tell me ...this is the right way to do this task or not....? </p>
  
  <p>if not please...tell me ..the right way...</p>
  
  <p>thanks in advance</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
  
  UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:[NSString stringWithFormat:@"Cell %i",indexPath.section]];
  
  if (cell == nil) {
  
      cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:[NSString stringWithFormat:@"Cell %i",indexPath.section]] autorelease];
  
  }
  
  
  if(indexPath.row==0)
  {
  
  
              CGRect frame=CGRectMake(120,10, 80, 40);
  
              UILabel *label1=[[UILabel alloc]init];
  
              label1.frame=frame;
  
      label1.text=@"first label";
  
      [cell.contentView addSubview:label1];
  
              [label1 release];
  
  
  
  
      CGRect frame2=CGRectMake(200,10, 80, 40);
  
              UILabel *label2=[[UILabel alloc]init];
  
              label2.frame=frame2;
  
      label2.text=@"second label";
  
      [cell.contentView addSubview:label2];
  
              [label2 release];
  
  
      and so on.......
  
  
  }
      else if(indexPath.row==1)
      {
         //add four labels for this cell here......
      }
  
  
  return cell;
  }
  </code></pre>