如何更改 tableViewCell 的颜色? [关闭]
Posted
技术标签:
【中文标题】如何更改 tableViewCell 的颜色? [关闭]【英文标题】:How do I change colour of tableViewCell? [closed] 【发布时间】:2017-03-09 19:34:44 【问题描述】:我需要将单元格的白色更改为我的自定义颜色 Here is the supported image
【问题讨论】:
How to customize the background color of a UITableViewCell?的可能重复 【参考方案1】:Cell.contentView.backgroundColor = UIColor.redColor() // Your Color
【讨论】:
将它添加到我的 ViewDidLoad() 中? 在这个方法中没有:func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell 你实现了 tableview 委托和数据源方法吗? 有没有办法改变字体系列和字体颜色? 是的,像这样:cell.textLabel.font = UIFont(name:"Avenir", size:22)以上是关于如何更改 tableViewCell 的颜色? [关闭]的主要内容,如果未能解决你的问题,请参考以下文章
在行选择Swift 3上设置TableViewCell标签颜色