美文网首页
iOS cell添加点击时改变字体的颜色及背景

iOS cell添加点击时改变字体的颜色及背景

作者: 我的天空蔚蓝色 | 来源:发表于2015-11-28 10:59 被阅读1291次
  cell.selectedBackgroundView.backgroundColor = [UIColor whiteColor];//选中后变换,色彩的变换     
 cell.textLabel.highlightedTextColor = [UIColor whiteColor];//选中字体颜色
cell.textLabel.textColor = [UIColor whiteColor];        cell.backgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"cc"]];        cell.selectedBackgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"cc_no"]];//选中后变换,图片的变换

相关文章

网友评论

      本文标题:iOS cell添加点击时改变字体的颜色及背景

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