当我 select UITableViewCell 时出现问题?

Something wrong when I select UITableViewCell?

当我select一个UITableViewCell背景变成灰色时,灰色高度很奇怪。有些单元格很奇怪,例如 it.I 将分隔线样式设置为 none。我在前面和脚部单元格添加标签,所以 cell.As 之间有线条显示在第一张图片中。 其他细胞都正常,正如我在第二张图片中所期望的那样。

看来我的问题已经解决了。 首先设置:

cell.selectionStyle = UITableViewCellSelectionStyleNone;

并覆盖方法:

- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated
{
    if (highlighted) {
        self.contentView.backgroudColor= [UIColor gray];
    } else {
        self.contentView.backgroudColor= [UIColor white];
    }
}