- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *
)indexPath
{
static NSString *cellIdentifier =
@"LeftTableViewCell";
LeftTableViewCell *cell =
[tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if (cell ==
nil) {
cell = [[[NSBundle mainBundle]loadNibNamed:
@"LeftTableViewCell" owner:nil options:nil]lastObject];
}else{
//cell重用问题解决
if (indexPath ==
lastIndexPath) {//点击cell的时候保存的
cell.contentView.backgroundColor =
[UIColor redColor];
}else{
cell.contentView.backgroundColor =
[UIColor clearColor];
}
}
cell.nameLabel.text =
self.dataArray[indexPath.row];
return cell;
}
转载于:https://www.cnblogs.com/yipingios/p/4611304.html
相关资源:各显卡算力对照表!