我通过继承UITableViewCell创建了一个新的自定义TableViewCell。我使用nib创建了一个带UIImage视图的TableView,并将其与视图的outlets链接。然后,在从我的TableView委托中填充表格时,我使用子类来返回TableView单元格。
Nib中的新内容正在加载。但是自定义TableView单元格的新大小(我将TableView单元格调整为更大的大小)未在TableView中加载。
在渲染过程中,我是否遗漏了一些调用?请帮忙。
Nib中的新内容正在加载。但是自定义TableView单元格的新大小(我将TableView单元格调整为更大的大小)未在TableView中加载。
在渲染过程中,我是否遗漏了一些调用?请帮忙。
@interface AccountOption : UITableViewCell
{
IBOutlet UIImageView* optionIcon;
}
@property (nonatomic, retain) IBOutlet UIImageView* optionIcon;
@end
在委托中,
NSArray* topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"AccountOption" owner:nil options:nil];
for (id currentCell in topLevelObjects) {
if ([currentCell isKindOfClass:[AccountOption class]]) {
cell = currentCell;
}
}
cell.optionIcon.image = [(NSDictionary*)[accountOptions objectAtIndex:indexPath.row] objectForKey:@"icon"];
return cell;