2
Je chargement d'un UITableViewCell utilisant,Est-il correct d'initialiser un UITableViewCell en utilisant initWithCoder?
[[NSBundle mainBundle] loadNibNamed:@"BlogCell" owner:self options:nil];
cell = blogCell;
self.blogCell = nil;
où blogCell
est une sortie à BlogCell.xib
La UITableViewCell réelle est de type BlogCell qui est une sous-classe de UITableViewCell.
Dans mon BlogCell classe J'utilise
-(id)initWithCoder:(NSCoder *)aDecoder {
self = [super initWithCoder:aDecoder];
//initialisation of some cell properties here
return self;
}
Est-ce exact? Est-ce la façon dont vous aborderiez l'initialisation d'une cellule chargée à partir d'une plume?
Merci
Ah oui cela fonctionne - merci. – dianovich