UITableViewCell 初始化
1、自定义cell (无Xib)
YourTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@”Identifier”];
if (!cell) {
cell = [[YourTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@”Identifier”];
}return cell;
2、自定义cell (含Xib)
YourTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@”Identifier”];
if (!cell) {
cell = [[[NSBundle mainBundle] loadNibNamed:@”XibName” owner:self options:nil] firstObject];
}return cell;
3、自定义cell (Prototype Cells)
YourTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@”Identifier”];
return cell;