title: iOS: How to select and scroll to a specific cell in a collectionView in swift 3?
body: <p>I would like to select and scroll to a specific <code>indexPath</code> in a <code>collectionView</code> with centring it. I found that functions, but impossible to combine them:</p>
  
  <pre><code>collectionView.selectItem(at: indexPath, animated: true, scrollPosition: UICollectionViewScrollPosition.centeredVertically)
  collectionView.scrollToItem(at: indexPath, at: .centeredHorizontally, animated: true)
  collectionView.scrollToItem(at: indexPath, at: .centeredVertically, animated: true)
  </code></pre>
  
  <p>Thanks in advance.</p>