How can I make the textfield alloc every time the delegate function is called?
<p>I am using code like this</p>

<pre><code>- (NSInteger)numberOfSectionsInTableView:(UITableView *)tv {
    return 3;
}

- (NSInteger)tableView:(UITableView *)tv numberOfRowsInSection:(NSInteger)section {
    if(section==2)
        return 20;
    else
        return 1;

}

- (UITableViewCell *)tableView:(UITableView *)tv cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    static NSString *MyIdentifier = @"MyIdentifier";

    UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:MyIdentifier];

    //if (cell == nil)
    cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:@"MyIdentifier"]autorelease];

    // Configure the cell
    switch (indexPath.section) {
        case 0:
        {
            textField=[[[UITextField alloc]initWithFrame:CGRectMake(5, 10, 290, 70)]autorelease];
            textField.delegate=self;
            textField.keyboardType=UIKeyboardTypeURL;
            textField.autocorrectionType=YES;
            textField.textColor=[UIColor blackColor];
            textField.placeholder=@"Enter feed url";
            [cell.contentView addSubview:textField];
            break;
        }
        case 1:
        {
            textField1=[[[UITextField alloc]initWithFrame:CGRectMake(5, 10, 290, 70)]autorelease];
            textField1.delegate=self;
            textField1.keyboardType=UIKeyboardTypeURL;
            textField1.textColor=[UIColor blackColor];
            textField1.autocorrectionType=YES;
            textField1.placeholder=@"Enter starting url";
            [cell.contentView addSubview:textField1];
            break;
        }
        case 2:
        {
            cell.text=[[PopeularSiteArray objectAtIndex:indexPath.row]objectForKey:@"Title"];
            break;
        }
        default :
            break;

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

<p>When I scrolling my tableview the textfield should alloc every time the delegate function called... I changed that code like when the textfield is nothing only it will be created but that time it shows garbage values in the textfield.</p>

<p>What could I use here?</p>
