I'm setting border of UICollectionViewCell in this way:
theView.layer.borderWidth = 5
theView.layer.borderColor = UIColor.white.cgColor
The problem is that I'm adding a subview over this collectionviewcell and it goes beneath the border like this:
I actually want to bring the subview over the CollectionViewCell
Code to add subview to cell:
plusImageView.translatesAutoresizingMaskIntoConstraints = false
addSubview(plusImageView)
plusImageView.centerYAnchor.constraint(equalTo: bottomAnchor).isActive = true
plusImageView.centerXAnchor.constraint(equalTo: trailingAnchor).isActive = true

https://developer.apple.com/documentation/uikit/uiview/1622541-bringsubviewtofront
Use parentView.bringSubviewToFront(subview) after adding subview to parent.