Hi all,
I am using table view for editing an object .
I am using below code to construct a uitableview cell.
It is working nicely but somehow while scrolling the cells changing internally .
static NSString *CellIdentifier2 = @"CustomCell Editable Identifier";
cell = [theTableView dequeueReusableCellWithIdentifier:CellIdentifier2];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1
reuseIdentifier:CellIdentifier2] autorelease];
cell.textLabel.text = rowLabel;
UITextField *theTextField = [[UITextField alloc] initWithFrame:CGRectMake(120, 10, 170, 25)];
theTextField.textAlignment = UITextAlignmentRight;
cell.editingAccessoryView =theTextField;
theTextField.tag = 602;
if ([rowKey isEqualToString:@"phone_no"]) {
[theTextField setKeyboardType:UIKeyboardTypeNumberPad];
}
theTextField.text = [rowValue ddEventValueDisplay];
[theTextField release];
return cell;
Can anyone tell me where am I wrong ?