国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > iOS > 正文

iOS開發UITableViewCell的選中時的顏色設置

2019-11-07 23:26:37
字體:
來源:轉載
供稿:網友

1.系統默認的顏色設置//無色  cell.selectionStyle = UITableViewCellSelectionStyleNone;  //藍色  cell.selectionStyle = UITableViewCellSelectionStyleBlue;  //灰色  cell.selectionStyle = UITableViewCellSelectionStyleGray;  2.自定義顏色和背景設置改變UITableViewCell選中時背景色:UIColor *color = [[UIColoralloc]initWithRed:0.0green:0.0blue:0.0alpha:1];//通過RGB來定義自己的顏色 cell.selectedBackgroundView = [[[UIView alloc] initWithFrame:cell.frame] autorelease];  cell.selectedBackgroundView.backgroundColor = [UIColor xxxxxx];  3.自定義UITableViewCell選中時背景cell.selectedBackgroundView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"cellart.png"]] autorelease];  //還有字體顏色  cell.textLabel.highlightedTextColor = [UIColor xxxcolor]; [cell.textLabel setTextColor:color] 4.設置tableViewCell間的分割線的顏色[theTableView setSeparatorColor:[UIColor xxxx ]]; 
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 铜陵市| 枣庄市| 调兵山市| 遂昌县| 眉山市| 恩施市| 五家渠市| 南充市| 易门县| 太湖县| 临沭县| 岑巩县| 铁力市| 万州区| 保山市| 商河县| 靖边县| 镇雄县| 横峰县| 东台市| 家居| 汤阴县| 阿合奇县| 蒲江县| 蓬安县| 安泽县| 始兴县| 康乐县| 南涧| 应用必备| 睢宁县| 如皋市| 石泉县| 全南县| 瑞昌市| 汉阴县| 天气| 汉阴县| 巴彦淖尔市| 崇明县| 林周县|