首页 > 移动平台 > 详细

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

时间:2015-06-03 19:01:48      阅读:3362      评论:0      收藏:0      [点我收藏+]
        cell.selectedBackgroundView.backgroundColor = [UIColor whiteColor];//选中后变换,色彩的变换
        cell.textLabel.highlightedTextColor = [UIColor colorWithRed:0/255.0 green:180/255.0 blue:140/255.0 alpha:1];//选中label颜色的变化
        cell.textLabel.textColor = [UIColor whiteColor];

        cell.backgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"fenlei-weidaidi"]];
        cell.selectedBackgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"fenlei-daidi"]];//选中后变换,图片的变换

 

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

原文:http://www.cnblogs.com/anyezhuixing/p/4549643.html

(0)
(3)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!