apprendre à créer des tableViewCell de xib

Je veux créer un personnalisé TableViewCell sur lequel je veux avoir UITextField avec la modification de la possibilité.
J'ai donc créé une nouvelle classe avec xib. Ajouter TableViewCell élément. Faites glisser sur elle UITextField. Ajout de points de vente dans ma classe et les relier tous ensemble. Dans ma méthode TableView cellForRowAtIndexPath j'ai créer mon personnalisée des cellules, MAIS ils ne sont pas à mon habitude de cellules, ils sont juste normal des cellules. Comment puis-je résoudre ce problème et pourquoi il en est? merci!

//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

//dans mon 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;
}

OriginalL'auteur yozhik | 2010-11-16