Question: I want to create a custom TableViewCell on which I want to have UITextField with editing possibility. 
So I created new class with xib. Add TableViewCell element. Drag on it UITextField. Added outlets in my class and connect them all together. In my TableView method cellForRowAtIndexPath I create my custom cells, BUT they are not my custom cells - they are just usual cells. How can I fix this problem, and why it is? thanx!

//EditCell. h

```
#import <UIKit/UIKit.h>

@interface EditCell : UITableViewCell
{
    IBOutlet UITextField *editRow;
}
@property (nonatomic, retain) IBOutlet UITextField *editRow;
@end

```

//EditCell.m

```
#import "EditCell.h"

@implementation EditCell
@synthesize editRow;

#pragma mark -
#pragma mark View lifecycle

- (void)viewDidUnload 
{
    // Relinquish ownership of anything that can be recreated in viewDidLoad or on demand.
    // For example: self.myOutlet = nil;
    self.editRow = nil; 
}
@end

```

//in my code

```
- (UITableViewCell *)tableView:(UITableView *)tableView 
         cellForRowAtIndexPath:(NSIndexPath *)indexPath 
{
    static NSString *CellIdentifier = @"EditCell";

    EditCell *cell = (EditCell*) [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil)
    {
        cell = [[[EditCell alloc] initWithStyle:UITableViewCellStyleSubtitle 
                                reuseIdentifier:CellIdentifier] autorelease];
    }
cell.editRow.text = @"some text to test";
return cell;
}

```

Answer: 
Do not use UITableViewCell's initializer, but make the cell load from your nib:

```
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 
{
    static NSString *CellIdentifier = @"EditCell";

    EditCell *cell = (EditCell*) [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil)
    {
        NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"YourNibNameHere" owner:self options:nil];
        cell = (EditCell *)[nib objectAtIndex:0];
    }
    cell.editRow.text = @"some text to test";
    return cell;
}

```

Of course, you need to specify the correct nib name.
You need to load your xib and retrieve your custom cell:

```
NSArray *uiObjects = [[NSBundle mainBundle] loadNibNamed:@"yourNib" 
                                                   owner:self 
                                                 options:nil];
for (id uiObject in uiObjects) {
     if ([uiObject isKindOfClass:[EditCell class]]) {
          cell = (EditCell *) uiObject;
     }
}

```

Make also sure you actually changed the tableViewCell class in your xib to EditCell.
You also need to change the tableView row heigh to the right size.

One other way is to just build your cell programmatically in your EditCell class, which I believe let's you be much more free and precise than within InterfaceBuilder:

In EditCell.m:

```
- (id)initWithStyle:(UITableViewCellStyle)style 
    reuseIdentifier:(NSString *)reuseIdentifier {

    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        CGRect textFieldRect = CGRectMake(5, 5, 300, 30);
        UITextField *textField = [[UITextField alloc] initWithFrame:textFieldRect];
        textField.tag = kTextFieldTag;
        [self.contentView addSubview:textField];
        [textField release];
    }
    return self;
}

```

Then in your tableViewController you create the cell the way you did and retrieve your textField with the tag.