Iphone 使用initWithCoder初始化UITableViewCell是否正确?
我正在使用加载UITableViewCellIphone 使用initWithCoder初始化UITableViewCell是否正确?,iphone,objective-c,uitableview,nib,Iphone,Objective C,Uitableview,Nib,我正在使用加载UITableViewCell [[NSBundle mainBundle] loadNibNamed:@"BlogCell" owner:self options:nil]; cell = blogCell; self.blogCell = nil; 其中,blogCell是blogCell.xib的出口 实际的UITableViewCell类型为BlogCell,它是UITableViewCell的子类 在我的BlogCell课程中,我正在使用 -(id)initWithCo
[[NSBundle mainBundle] loadNibNamed:@"BlogCell" owner:self options:nil];
cell = blogCell;
self.blogCell = nil;
其中,blogCell
是blogCell.xib的出口
实际的UITableViewCell类型为BlogCell,它是UITableViewCell的子类
在我的BlogCell课程中,我正在使用
-(id)initWithCoder:(NSCoder *)aDecoder {
self = [super initWithCoder:aDecoder];
//initialisation of some cell properties here
return self;
}
这是正确的吗?这是处理从nib加载的单元格初始化的方法吗
谢谢,或者在
awakeFromNib
中