美文网首页
改变cell在点击时的颜色

改变cell在点击时的颜色

作者: rxdxxxx | 来源:发表于2016-02-24 17:18 被阅读587次

RedRain的简书:http://www.jianshu.com/users/29e03e6ff407/latest_articles

http://no001.blog.51cto.com/1142339/646408/
cell.selectionStyle 是默认即可

// 设置cell点击后的选中时的背景颜色
self.contentView.backgroundColor = [UIColor clearColor];
UIView *aView = [[UIView alloc]initWithFrame:self.contentView.frame];
aView.backgroundColor = [UIColor colorWithRed:0.95fgreen:0.95f blue:0.95f alpha:1.00f];
self.selectedBackgroundView = aView;   //设置选中后cell的背景颜色

相关文章

网友评论

      本文标题:改变cell在点击时的颜色

      本文链接:https://www.haomeiwen.com/subject/nfjikttx.html