问题描述
我刚刚在我的应用中实现了一个新的集合视图,该collectionView周围需要边框,否则看起来会很奇怪...
我的问题是,当我添加边框时,collectionView中单元格的边框彼此重叠。我尝试通过仅使最深的颜色成为可能来解决此问题,这样您就不会注意到重叠,但是由于某种原因,颜色仍然会变深。
这就是我实现单元格边框的方式:
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "celll",for: indexPath) as! profileLandscapeCollectionViewCell
cell.layer.borderWidth = 0.25
cell.layer.borderColor = UIColor.init(red: 0,green: 0,blue: 0,alpha: 1).cgColor //trying to get the darkest color (same as UIColor.black.cgColor)
是否可以解决此问题?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)