IOS开发-选中某行Cell的时候,添加的分隔线消失的问题

重写-setSelected:animated:和 -setHighlighted:animated:方法

@property (nonatomic, weak) UIView *lineview;

  • (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated
    {
    [super setHighlighted:highlighted animated:animated];
    self.lineview.backgroundColor = [UIColor b lackColor];
    }

  • (void)setSelected:(BOOL)selected animated:(BOOL)animated
    {
    [super setSelected:selected animated:animated];
    self.lineview.backgroundColor = [UIColor blackColor];
    }

你可能感兴趣的:(IOS开发-选中某行Cell的时候,添加的分隔线消失的问题)