zoukankan      html  css  js  c++  java
  • 取消UITableViewCell的背景色

     1 //无色
     2 cell.selectionStyle = UITableViewCellSelectionStyleNone;
     3 //蓝色,也就是系统默认的颜色
     4 cell.selectionStyle = UITableViewCellSelectionStyleBlue;
     5 //灰色
     6 cell.selectionStyle = UITableViewCellSelectionStyleGrap;
     7 
     8 //自定义选中的背景色 通过RGB来定义颜色
     9 UIColor* color = [[UIColor alloc]initWithRed:0.0 green:0.0 blue:0.0 alpha:1];
    10 cell.selectedBackgroundView = [[UIView alloc]initWithFrame:cell.frame]autorelease];
    11 cell.selectedBackgroundView.backgroundColor = [UIColor redColor];
    12 
    13 //自定义选中后的背景图片
    14 cell.selectedBackgroundView = [[[UIImageView alloc]initWithImage:
    [UIImage imageNamed:@"image.png"]]autorelease]; 15 //设置UITableViewCell中的字体颜色时用 16 cell.textLabel.highlightedTextColor = [UIColor **color];
  • 相关阅读:
    睁大你的眼睛,警惕职业生涯中的“红灯”
    几则好玩的脑筋急转弯
    File.Delete()的解决
    Powershell之True或False
    发送邮件
    IE与CSS兼容性
    WSS
    File.Delete()
    添加field部署
    css加载
  • 原文地址:https://www.cnblogs.com/wangshengl9263/p/3260440.html
Copyright © 2011-2022 走看看