tableview text over ride with previous text
<p>i am displaying array of data in a table view.</p>

<p>my code for that is like this.</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] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
    }

    // Set up the cell


    CGRect labelFrame = CGRectMake(0,0 , 100, 25);    
   itemNameLabel = [[[UILabel alloc] initWithFrame:labelFrame] autorelease];

    itemNameLabel.textAlignment = UITextAlignmentLeft;
    itemNameLabel.backgroundColor = [UIColor clearColor];
    itemNameLabel.text = [tableData objectAtIndex:indexPath.row];
    CGRect anotherLabelFrame = CGRectMake(120, 0, 100, 25);
    quantityLabel = [[[UILabel alloc] initWithFrame:anotherLabelFrame] autorelease];

    quantityLabel.textAlignment = UITextAlignmentLeft;
    quantityLabel.backgroundColor = [UIColor clearColor];
    MyGroceryListAppDelegate *appDelegate = (MyGroceryListAppDelegate *)[[UIApplication sharedApplication] delegate];
    Category *obj = (Category *)[appDelegate.itemsList objectAtIndex:indexPath.row];

    quantityLabel.text = [NSString stringWithFormat:@"%d",obj.quantity];
    [cell.contentView addSubview:itemNameLabel];
    [cell.contentView addSubview:quantityLabel];


    return cell;
} 
</code></pre>

<p>how can i resolve this.</p>

<p>can any one please help me.</p>

<p>Thank u in advance.</p>

<p>i am giving text for  itemNameLabel is using array and for quantityLabel using class object.</p>

<p>so,when i scrolling table view the array names are override on other label,but quantity label is not overriding because it is from class.</p>

<p>i need to display itemNameLabel from array since it changes it value.</p>

<p>when i scroll table view my tableview is looking like this.<img src="http://i.stack.imgur.com/xxzlJ.png" alt="mytableview">  </p>
