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

        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"]];//选中后变换,图片的变换

 

文章来自:http://www.cnblogs.com/anyezhuixing/p/4549643.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3