您的当前位置:首页正文

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

2024-12-13 来源:东饰资讯网
  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"]];//选中后变换,图片的变换
显示全文