title: Collection view every next cell should visible 10% in the current screen
body: <p>I have many collection view cells. I want to show two collection view cells on the screen with respect to first cell (A) should visible 90% of the screen and second cell (B) should visible 10% in the present screen, if i scroll to next cell. first cell (A) visible 10% of the screen and second cell (B) visible 90% of the screen.</p>
  <p>I was Achieved by below code.</p>
  <ol>
  <li>Perfectly working if i have 2 cells</li>
  <li>Not exactly working if i have more than 2 cells.</li>
  </ol>
  <pre><code>func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -&gt; CGSize {
  
      let value = 0.9;
      let width = UIScreen.main.bounds.size.width*CGFloat(value)
      return CGSize(width: width, height: collectionView.frame.height)
  }
  </code></pre>
  <p>RefImage:
  <a href="https://i.stack.imgur.com/gGdNO.png" rel="nofollow noreferrer">Expected output</a></p>