title: How can I add some insets to the text inside the UILabel?
body: <p>I'm trying to add insets to the text inside the UILabel without subclassing it. Or even with UILabel subclass but without changing too much the code.
  How can I do it?</p>
  
  <pre><code>class CustomCell: UICollectionViewCell {
      var data:CustomData? {
          didSet {
              guard let data = data else { return }
              //bg.image = data.image
              bg.text = data.title
          }
      }
  
      fileprivate let bg: UILabel = {
          let iv = UILabel()
  
          iv.layer.backgroundColor = UIColor.gray.cgColor
          iv.textAlignment = .center
          iv.numberOfLines = 0
          iv.font = UIFont(name: "Helvetica", size: 40)
          iv.adjustsFontSizeToFitWidth = true
          iv.minimumScaleFactor = 0.5
          iv.translatesAutoresizingMaskIntoConstraints = false
          iv.layer.cornerRadius = 12
  
          return iv
      }()
  
      override init(frame: CGRect) {
          super.init(frame: frame)
  
          contentView.addSubview(bg)
          bg.topAnchor.constraint(equalTo: contentView.topAnchor).isActive = true
          bg.leadingAnchor.constraint(equalTo: contentView.leadingAnchor).isActive = true
          bg.trailingAnchor.constraint(equalTo: contentView.trailingAnchor).isActive = true
          bg.bottomAnchor.constraint(equalTo: contentView.bottomAnchor).isActive = true
      }
  
      required init?(coder aDecoder: NSCoder) {
          fatalError("init(coder:) has not been implemented")
      }
  }
  </code></pre>