Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // correct way for to scroll, or execute a block of code, only after of reloadData completion
- [self.collectionView reloadData];
- [[NSOperationQueue mainQueue] addOperationWithBlock:^{
- // scroll to item
- NSIndexPath *indexPath = [NSIndexPath indexPathForItem:3 inSection:0];
- [self.collectionView selectItemAtIndexPath:indexPath animated:YES scrollPosition:UICollectionViewScrollPositionLeft];
- }];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement