rows are interchanging in uitableview in iphone?
<p>In my application i need to add contacts of users, for that i am using UITableview with sections. Each section may contains 2 or 3 rows.
 while the editing was completed and scrolling the table view to top, the rows are interchanging in between sections.
Actually In design part i have placed FirstName and LastName in first section and email in second section but they are interchanging as firstName, email as first section and LastName as second section . can any one help me to solve this.
Thanks in advance.</p>

<p><strong>EDIT:</strong></p>

<p>Please find the code snippet below.</p>

<p>the method CellForRowAtIndexPath:</p>

<pre><code>static NSString *CellIdentifier = @"Cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) 
    {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;



        if(indexPath.section == 0) 
        {

            if(indexPath.row == 0) 
            {
//content of first Name

                txtFieldFirstName = [[UITextField alloc] initWithFrame:CGRectMake(10, 10, 290, 24)];
                txtFieldFirstName.tag=1;
                //txtFieldFirstName.placeholder = @"First";
                txtFieldFirstName.delegate = self;
                txtFieldFirstName.font = [UIFont fontWithName:@"Helvetica" size:16.0];
                [cell.contentView addSubview:txtFieldFirstName];
            }

            else if(indexPath.row == 1) {
            //content of last Name
            }
        }

        else if(indexPath.section == 1) 
        {

            if(indexPath.row == 0) {
//content of Phone No
            }

            else if(indexPath.row == 1) {
           //content of Mobile no
            }
</code></pre>

<p>this is how i am implementing my code. Please help me on this. </p>
