title: How to manage the number of rows in a section?
body: <p>I am using a table view in one of myapplications. In that number of sections are one and number of rows are 20. And i want to place the image and two lables in that every row. So to fill up the rows,i written the below code in <code>CellForrowIndexpath</code> method</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
    {
        static NSString *CellIdentifier = @"Cell";
        UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
        if (cell == nil) {
            cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
        }
        int i=indexPath.row;
        if (indexPath.row==i)
        {
  
            cell = [self getCellContentView:CellIdentifier];
  
            UILabel *lblTemp1 = (UILabel *)[cell viewWithTag:1];
            UILabel *lblTemp2 = (UILabel *)[cell viewWithTag:2];
            //UILabel *lblTemp3 = (UILabel *)[tableCell viewWithTag:3];
             lblTemp1.text = [ctrycodearray objectAtIndex:indexPath.row];
             lblTemp2.text = @"Alert";
  
            UIImageView *img=[[UIImageView alloc]initWithFrame:CGRectMake(0,0, 100, 30)];
            img.image=[UIImage imageNamed:@"thumb_mdpi.png"];
  
            //NSString *cellValue1 = [default1 stringForKey:@"keyToRepeatString"];
            //repeatlbl.text=cellValue1;   
  
            //[img release];
          [cell.contentView addSubview:img];
  
            return cell;
        }
  </code></pre>
  
  <p>In the <code>getCellContentView</code> method i declared the two lables.After executing this one i got the error.This <code>cellForRowAtIndexPath</code> method executed 6 or 7 times and print the 6 or 7 rows>but if move to top the below errowill occured.So please tell me how to solve this.</p>