title: Fitting 2 collection view cell per row (same on all devices)
body: <p>I've created a collection view controller and im trying to fit 2 cells per row in two columns. I got it the way i want it running on a iphone 8, but on other devices (plus, 5s, Xs max...) it gets all messed up. Heres a picture of it on iphone 8:!<a href="https://imageshack.com/a/img923/3521/DFwwvc.png" rel="nofollow noreferrer">https://imageshack.com/a/img923/3521/DFwwvc.png</a></p>
  
  <p>Heres how my collection view is set up: </p>
  
  <pre><code>func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -&gt; Int {
  
      collectionView.backgroundColor = .clear
      collectionView.contentInset = UIEdgeInsets(top: 10.0,
                                                 left: 2.0,
                                                 bottom: 10.0,
                                                 right: 2.0)
  
      return nomeItem.count
  }//func numberOfItemsInSection
  func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -&gt; UICollectionViewCell {
  
      let celula = collectionView.dequeueReusableCell(withReuseIdentifier: "PronafCollectionCell", for: indexPath as IndexPath) as! PronafCollectionCell
  
      celula.labelNumeroItem.text = String(indexPath.row+1)
      celula.labelTitulo.text = nomeItem[indexPath.row]
      celula.labelDescricao.text = descricaoItem[indexPath.row]
  
      return celula
  }//func cellForItemAt
  
  func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
  
      switch (indexPath.row){
      case 0:
          self.performSegue(withIdentifier: "segueDescricao", sender: self)
      case 1:
          self.performSegue(withIdentifier: "segueProponente", sender: self)
      case 2:
          self.performSegue(withIdentifier: "segueResponsavelTecnico", sender: self)
      case 3:
          self.performSegue(withIdentifier: "segueCar", sender: self)
      case 4:
          self.performSegue(withIdentifier: "segueImovel", sender: self)
      case 5:
          self.performSegue(withIdentifier: "segueDesenho", sender: self)
      case 6:
          self.performSegue(withIdentifier: "segueBuscar", sender: self)
      case 7:
          self.performSegue(withIdentifier: "segueResumo", sender: self)
      default:
          break
      }//switch (indexPath.row)
  }}
  </code></pre>