设置xcode中模版tableViewCell的textLabel和detailTextLabel背景颜色
来源:互联网 发布:上海东行网络 编辑:程序博客网 时间:2024/04/25 22:01
注意:在- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath代理方法中修改textLabel和detailTextLabel的背景颜色,不会马上生效,具体原因没有深入研究(Xcode 7.1 iOS9.1环境中);
下面的代理方法设置,界面效果会马上响应,亲测可行:
- (void)tableView: (UITableView*)tableView willDisplayCell: (UITableViewCell*)cell forRowAtIndexPath: (NSIndexPath*)indexPath
{
cell.backgroundColor = [UIColor blackColor];
cell.textLabel.backgroundColor = [UIColor redColor];
cell.detailTextLabel.backgroundColor = [UIColor blueColor];
}
0 0
- 设置xcode中模版tableViewCell的textLabel和detailTextLabel背景颜色
- iOS设置tableViewCell的cell、textLabel和detailTextLabel背景颜色
- UITableView中textLabel和detailTextLabel的使用
- UITableView中textLabel和detailTextLabel的使用
- UITableView中textLabel和detailTextLabel的使用
- 设置tableViewCell的背景颜色
- UITableView: textLabel,detailTextLabel
- html中如何设置背景和背景颜色的透明度
- 设置Dialog的背景颜色及其中控件的背景颜色和字体颜色
- tableviewcell表视图cell选中时的颜色及背景设置,为什么无效?
- 控件背景颜色和窗口背景颜色的设置
- xcode 编码区设置背景颜色的方法
- tableViewCell 被选中时候的背景自定义和文字高亮颜色
- Myeclipse中console的背景颜色设置
- 设置UINavigation的背景图片和背景颜色
- gVim的字体和背景颜色设置
- 设置RGui的背景颜色和字体
- 设置navigationController的背景颜色和背景图片
- Java实现二叉树、 双链表
- Android存储-SQLite
- uva 12627——Erratic Expansion
- 最长连续序列
- 手机css3动画与animate动画流畅度比较
- 设置xcode中模版tableViewCell的textLabel和detailTextLabel背景颜色
- MATLAB线性分类器
- 关于html中CSS的小结
- uva 714——Copying Books
- 机器学习数据预处理
- PHP PDOException MySql Error Codes and Messages
- 剖析Java同步块synchronized及常用使用方法
- codeforces 592D 树链剖分
- Android 自定义seekbar 代码实现