0

I am using this code to scroll my UICollectionView to the top:

CGPointMake(0, -self.collectionView.contentInset.top) animated:YES];

It does what its supposed to, but the problem is that the cells disappear during scrolling (or better yet, the ones that are above the position on which the scroll starts are not loaded / shown until the animation is finished). Is there any way to fix this?

I would also like to know if there is a way to tell when did this animation finish?

Thank you.

andrejbroncek
  • 421
  • 5
  • 17

1 Answers1

0

I think you should try this method to scroll to top:

- (void)scrollToItemAtIndexPath:(NSIndexPath *)indexPath 
               atScrollPosition:(UICollectionViewScrollPosition)scrollPosition 
                       animated:(BOOL)animated
ZetaPR
  • 964
  • 7
  • 32
Bart
  • 47
  • 5