I know this is an old question, but I recently had the same issue. The best solution I found was from Gene De Lisa at http://www.rockhoppertech.com/blog/scroll-to-uicollectionview-header/ As you seem to be working in Obj-C, here is the port of its Swift code, which i use:
-(void) scrollToSectionHeader:(int)section { NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:section]; UICollectionViewLayoutAttributes *attribs = [self.collectionView layoutAttributesForSupplementaryElementOfKind:UICollectionElementKindSectionHeader atIndexPath:indexPath]; CGPoint topOfHeader = CGPointMake(0, attribs.frame.origin.y - self.collectionView.contentInset.top); [self.collectionView setContentOffset:topOfHeader animated:YES]; }
The code above will scroll correctly to the title of this section (all I need). Trivially changing this to go to the footer instead:
-(void) scrollToSectionFooter:(int)section { NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:section]; UICollectionViewLayoutAttributes *attribs = [self.collectionView layoutAttributesForSupplementaryElementOfKind:UICollectionElementKindSectionFooter atIndexPath:indexPath]; CGPoint topOfFooter = CGPointMake(0, attribs.frame.origin.y - self.collectionView.contentInset.top); [self.collectionView setContentOffset:topOfFooter animated:YES]; }
source share