title: Swift - Customizing cell content (UILabel, UIImageView)
body: <p>I would like to customize my <code>UICollectionViewCell</code> but it doesn't work how I would like it to work. </p>
  
  <p>This is my code for the first cell:</p>
  
  <pre><code>class MainWishlistCell: UICollectionViewCell {
      let wishlistImage: UIImageView = {
          let v = UIImageView()
          v.translatesAutoresizingMaskIntoConstraints = false
          v.image = UIImage(named: "logoGroß")
          v.layer.cornerRadius = 3.0
          v.layer.shadowColor = UIColor.black.cgColor
          v.layer.shadowOffset = CGSize(width: 3, height: 3)
          v.layer.masksToBounds = false
          return v
      }()
  
      let wishlistLabel: UILabel = {
          let v = UILabel()
          v.translatesAutoresizingMaskIntoConstraints = false
          v.text = "Main Wishlist"
          v.font = UIFont(name: "Avenir Next-Bold", size: 18)
          v.textColor = .darkGray
          v.textAlignment = .center
          return v
      }()
  
      override init(frame: CGRect) {
          super.init(frame: frame)
          commonInit()
      }
  
      required init?(coder: NSCoder) {
          super.init(coder: coder)
          commonInit()
      }
  
      func commonInit() -&gt; Void {
          contentView.addSubview(wishlistImage)
          contentView.addSubview(wishlistLabel)
          // constrain view to all 4 sides
          NSLayoutConstraint.activate([
              wishlistImage.topAnchor.constraint(equalTo: contentView.topAnchor),
              wishlistImage.leadingAnchor.constraint(equalTo: contentView.leadingAnchor),
              wishlistImage.trailingAnchor.constraint(equalTo: contentView.trailingAnchor),
              wishlistImage.heightAnchor.constraint(equalToConstant:150),
  
              wishlistLabel.topAnchor.constraint(equalTo: wishlistImage.bottomAnchor,constant: 1),
              wishlistLabel.bottomAnchor.constraint(equalTo: contentView.bottomAnchor),
              wishlistLabel.leadingAnchor.constraint(equalTo: contentView.leadingAnchor),
              wishlistLabel.trailingAnchor.constraint(equalTo: contentView.trailingAnchor),
          ])
      }
  }
  </code></pre>
  
  <p>And it looks like this: </p>
  
  <p><a href="https://i.stack.imgur.com/fS9lkl.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fS9lkl.jpg" alt="enter image description here"></a></p>
  
  <p><strong>1. Problem</strong> - Why is the label not <code>bold</code>?</p>
  
  <p><strong>2. Problem</strong> - Why is there no <code>cornerRadius</code>?</p>
  
  <p><strong>3. Problem</strong> - Why does <code>shadow</code> not appear (bottom + right) ?</p>