我找到了自定义 UITableViewCell 的代码:
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{
NSArray* views = [[NSBundle mainBundle] loadNibNamed:@"MyCustomCell" owner:nil options:nil];
MyCustomCell *customCell = [[MyCustomCell alloc]init];
MyCustomCell.cellImage = [arrayImages objectAtIndex:indexPath.row];
for (UIView *view in views)
{
if([view isKindOfClass:[UITableViewCell class]])
{
cell = (MyCustomCell *)view;
}
}
}
我无法弄清楚这个特定部分是如何工作的:cell = (MyCustomCell *)view;
我想为我之前创建的 MyCustomCell (customCell) 实例更改它...我该怎么做?