我有一个UITableViewCell我这样使用的自定义:
AppTableCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"AppTableCell" owner:self options:nil];
for(id currentObject in topLevelObjects) {
if([currentObject isKindOfClass:[AppTableCell class]]) {
cell = (AppTableCell *)currentObject;
break;
}
}
}
Run Code Online (Sandbox Code Playgroud)
工作完美无瑕.但是,我想在创建时为单元格做一些自定义的事情.通常我会覆盖类似的东西initWithFrame,但它没有在这里使用.我应该覆盖哪种方法来自定义初始化?