UICollectionView - Scrolling to first cell
问题 I'm making use of UICollectionView and I need to scroll to first cell after click in a button. The button is located in a (big) header section in my collection view... when clicking int it, I need scroll to my first cell located bellow of this button. I created a action of this button, but I don't know how to scroll to first UICollectionViewCell. Can someone help me? 回答1: Use this delegate method, setting the indexPath at the first position: Swift self.collectionView?.scrollToItemAtIndexPath