UICollectionCell和UITableViewCell背景颜色在角落后面

时间:2019-02-08 16:00:03

标签: uitableview uicollectionviewcell

嗨,我的情况如下图所示:

enter image description here

我可以使角落后面的小视图与单元格的背景颜色有所不同吗?

我尝试了以下代码:

 cell.lblActionTitle.text = sectionValue.data?.title
        cell.lblActionTitle.font = UIFont(name: "HelveticaNeue", size: 18)
        cell.lblActionTitle.textColor = .black
        cell.lblActionTitle.backgroundColor = .yellow
        cell.layer.borderColor = UIColor.black.cgColor
        cell.layer.borderWidth = 0.5
        cell.layer.cornerRadius = 10
        cell.clipsToBounds = true
        cell.layer.masksToBounds = true
        cell.layoutSubviews() 

1 个答案:

答案 0 :(得分:0)

我使用自己喜欢的图形程序制作了一个图像,并将其用作背景。结果是:

enter image description here

相关问题