title: CollectionView Cell Rounded Corners not Working
body: <p>I have a prototype cell for a collection view and am trying to make the edges rounded, but I can't figure out how to use self.layer.cornerRadius = 3.0 and make it work. Could anyone tell me what I'm doing wrong?</p>
  
  <pre><code>import UIKit
  
  final class TagCell: UICollectionViewCell {
  
      let textLabel: UILabel
  
      override init(frame: CGRect) {
  
          self.textLabel = UILabel(frame: .zero)
          self.textLabel.setFont(14)
          self.textLabel.translatesAutoresizingMaskIntoConstraints = false
          self.textLabel.textAlignment = .center
          self.textLabel.backgroundColor = .red
          self.textLabel.layer.cornerRadius = 2.0
  
          super.init(frame: frame)
  
          self.contentView.layer.cornerRadius = 2.0
          self.contentView.clipsToBounds = true
  
          self.contentView.addSubview(textLabel)
  
          NSLayoutConstraint.activate([
              self.textLabel.topAnchor.constraint(equalTo: self.contentView.topAnchor, constant: 16),
              self.textLabel.bottomAnchor.constraint(equalTo: self.contentView.bottomAnchor, constant: -16),
              self.textLabel.leadingAnchor.constraint(equalTo: self.contentView.leadingAnchor, constant: 16),
              self.textLabel.trailingAnchor.constraint(equalTo: self.contentView.trailingAnchor, constant: -16),
              ])
      }
  
      required init?(coder decoder: NSCoder) {
          fatalError()
      }
  }
  </code></pre>