我想改变tablecell的背景颜色。 这里是代码:自定义UITableViewCell背景颜色
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
var cell = tableView.dequeueReusableCellWithIdentifier("FirstMainViewTableCells") as! FirstMainViewTableCell
cell.backgroundColor = UIColor(red: 43, green: 65, blue: 87, alpha: 1)
return cell
}
这里是结果:
但它与UIColor.blackColor()和作品的UIColor。颜色:
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
var cell = tableView.dequeueReusableCellWithIdentifier("FirstMainViewTableCells") as! FirstMainViewTableCell
cell.backgroundColor = UIColor.blackColor()
return cell
}
你能帮助我吗?
我得到403错误页面,不能查看您的保管箱。 –
@ Dato'MohammadNurdin我们甚至不需要链接,它明显的背景是黑色的。 – Arbitur