0
如果我设置光栅化如下:重用UITableViewCell时,光栅化如何工作?
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
NSString *const cellIdentifier = @"UITableViewCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if (!cell) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
cell.layer.shouldRasterize = YES;
cell.layer.rasterizationScale = [UIScreen mainScreen].scale;
cell.textLabel.text = exampleTitles[indexPath.row];
return cell;
}
据我所知,该系统应该为每个不同单元的图像缓存。但是如果每个单元格的标题都不一样呢?系统如何确定哪些缓存图像可用于特定单元?