码迷,mamicode.com
首页 > 其他好文 > 详细

UITableViewCell 选中的状态小技巧

时间:2016-04-20 23:23:29      阅读:143      评论:0      收藏:0      [点我收藏+]

标签:

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {

    [super setSelected:selected animated:animated];
//cell 没被选中时 隐藏这个 _leftImageView
    self.leftImageView.hidden = !selected;
//选中text变红 不然变灰色
    self.textLabel.textColor = selected ? [UIColor redColor] : [UIColor grayColor];

    // Configure the view for the selected state
}

下面的截图中 设置后 cell 被选中了 也不会进入高亮状态

技术分享

UITableViewCell 选中的状态小技巧

标签:

原文地址:http://www.cnblogs.com/arenouba/p/5414822.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!