title: Collectionview Second item starts from centre instead of Top
body: <p>I am trying to copy the search layout of Instagram for the collectionview. I have tried doing it but my second item starts from the center instead of top which is causing the problem.</p>
  
  <p>Actual Output: <a href="https://i.stack.imgur.com/7zYFF.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7zYFF.jpg" alt="Actual Output"></a></p>
  
  <p>Expected Outlput: <a href="https://i.stack.imgur.com/o8CFl.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o8CFl.jpg" alt="Expected Output"></a></p>
  
  <p>Here is my code</p>
  
  <pre><code>extension UIViewController: UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout{
  
  
  
  public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -&gt; Int {
      return 12
  }
  
  public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -&gt; UICollectionViewCell {
  
      let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "CVCell", for: indexPath) as! CVCell
      cell.backgroundColor = .lightGray
      cell.lbl.text = "\(indexPath.item)"
      cell.lbl.textAlignment = .center
      cell.layer.borderColor = UIColor.black.cgColor
      cell.layer.borderWidth = 0.5
  
      return cell
  
  }
  
  public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -&gt; CGSize {
      if indexPath.item == 0{
          return CGSize(width: (UIScreen.main.bounds.width / 3) * 2, height: (UIScreen.main.bounds.width / 3) * 2)
      }
      return CGSize(width: UIScreen.main.bounds.width / 3, height: UIScreen.main.bounds.width / 3)
  }
  </code></pre>