国产探花免费观看_亚洲丰满少妇自慰呻吟_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 ]]; 
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 淮南市| 姜堰市| 萨嘎县| 遵义市| 光山县| 湖北省| 布尔津县| 丰县| 五大连池市| 怀远县| 聂荣县| 山西省| 叶城县| 都昌县| 开原市| 余江县| 彭山县| 全南县| 桂林市| 永泰县| 杭锦旗| 武冈市| 天镇县| 高密市| 涡阳县| 工布江达县| 台山市| 潼关县| 伊金霍洛旗| 务川| 连山| 普陀区| 肥东县| 砀山县| 黔江区| 桦南县| 上栗县| 灵宝市| 吉安县| 扎赉特旗| 南涧|