title: Moving selected UICollectionView Cell to the centre of collectionview
body: <p>I have collectionview cell as follows. Middle row should be always visible and two other should always be half seen.But, when I click any row at top or bottom, it should occupy middle cell position. How can i do it? </p>
  
  <p>I tired below but it did make selected  cell visible, but not takes to centre.</p>
  
  <pre><code> - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
  {
        [colctnView_gallery scrollRectToVisible:[[colctnView_gallery   layoutAttributesForItemAtIndexPath:indexPath] frame] animated:YES];
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/ncQtP.png" alt="enter image description here">w as follows:</p>