title: Why are cells in the UICollectionView being cut off?
body: <p>For some odd reason, the first cell in my UICollectionView is being cut off. I designed a cell using a prototype cell in Interface Builder. I set a custom height and the constraints, however, the cell is cut off when running the application. Please see the images below for clarification:</p>
  
  <p>This is how it is supposed to look:</p>
  
  <p><a href="https://i.stack.imgur.com/H6zEt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/H6zEt.png" alt="enter image description here"></a></p>
  
  <p>This is how it looks when I run the application:</p>
  
  <p><a href="https://i.stack.imgur.com/qqLd2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qqLd2.png" alt="enter image description here"></a></p>
  
  <p>This is the code behind the class the collection view is in:</p>
  
  <pre><code>override func viewDidLoad() {
      super.viewDidLoad()
  
      // set the navigation title
      self.navBar.titleTextAttributes = [NSAttributedStringKey.font: UIFont(name: "Trueno", size: 17)!]
      self.navBar.topItem?.title = user.username
  
  }
  
  @IBAction func handleSettings(_ sender: Any) {
  
      let action = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
  
  
      let settings = UIAlertAction(title: "Settings", style: .default) { action -&gt; Void in
          self.show(ViewController: "SettingScene")
      }
      let editProfile = UIAlertAction(title: "Edit Profile", style: .default) { action -&gt; Void in
          self.show(ViewController: "SettingScene")
      }
      let cancel = UIAlertAction(title: "Cancel", style: .cancel) { action -&gt; Void in}
  
      action.addAction(editProfile)
      editProfile.setValue(UIColor.purple, forKey: "titleTextColor")
      action.addAction(settings)
      settings.setValue(UIColor.purple, forKey: "titleTextColor")
      action.addAction(cancel)
      cancel.setValue(UIColor.purple, forKey: "titleTextColor")
  
      present(action, animated: true, completion: nil)
  }
  
  func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -&gt; Int {
      return user.posts.count + 1
  }
  
  func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -&gt; UICollectionViewCell {
  
      var cell: UICollectionViewCell
  
      // add the profile header/info cell if there are no cells inside of the colelction view
      if collectionView.visibleCells.count == 0 {
          let c = collectionView.dequeueReusableCell(withReuseIdentifier: "ProfileInfoCollectionViewCell", for: indexPath) as! ProfileInfoCollectionViewCell
  
          c.profilePic.layer.cornerRadius = c.profilePic.frame.width / 2
          c.profilePic.image = user.profilePic
          c.profilePic.clipsToBounds = true
  
          c.name.text = user.name
          c.bio.text = user.bio
          c.followerCount.text = String(user.followers.count)
          c.followingCount.text = String(user.following.count)
          c.memeCount.text = String(user.postCount)
  
          cell = c
      } else {
          let c = collectionView.dequeueReusableCell(withReuseIdentifier: "ProfilePostCollectionViewCell", for: indexPath) as! ProfilePostCollectionViewCell
          c.imageView.image = user.posts[indexPath.row - 1].img
          cell = c
      }
  
      return cell
  
  }
  </code></pre>
  
  <p>Any help on fixing this issue would be appreciated. Thanks!</p>