首页 > 其他 > 详细

UITableViewCell 选中的状态小技巧

时间:2016-04-20 23:23:07      阅读:242      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!