I want my UICollectionView to automatically scroll to the bottom. I have this code in my viewDidAppear but when I run it, there is always an half-second pause between the view is showed and the collection view is scrolled to the bottom. I read other questions and didn't find an answer yet. Anyone has an idea?
- (void)viewDidAppear:(BOOL)animated{
NSInteger numbersOfItems = self.photoAssets.count - 1;
NSLog(@"%i", [self.collectionView numberOfItemsInSection:0]);
[self.collectionView scrollToItemAtIndexPath:[NSIndexPath indexPathForItem:numbersOfItems inSection:0] atScrollPosition:UICollectionViewScrollPositionCenteredVertically animated:NO];
}