I want to scroll to footer or header view of the collection view, however, the standard approach with scrollToItemAtIndexPath scrolls only to the cells
- (void)scrollToBottom {
NSInteger section = [self numberOfSectionsInCollectionView:self.collectionView] - 1;
NSInteger item = [self collectionView:self.collectionView numberOfItemsInSection:section] - 1;
if ((section > 0) && (item > 0)) {
NSIndexPath * lastIndexPath = [NSIndexPath indexPathForItem:item inSection:section];
[self.collectionView scrollToItemAtIndexPath:lastIndexPath atScrollPosition:UICollectionViewScrollPositionBottom animated:NO];
}
}
How to scroll to any footer, header view, similar as with scrolling to cell?