Reputation: 3832
I am programatically scrolling my collection view. It works perfectly on every iOS version except for iOS 10. The collection view scrolls without animation, it just snaps into place.
Is this a bug or I should be doing something differently in iOS 10?
Here is my code:
NSArray *visibleItems = [collectionViewReference indexPathsForVisibleItems];
NSIndexPath *currentItem = [visibleItems objectAtIndex:0];
NSIndexPath *previousItem = [NSIndexPath indexPathForItem:currentItem.item - 1 inSection:currentItem.section];
[collectionViewReference scrollToItemAtIndexPath:previousItem atScrollPosition:UICollectionViewScrollPositionRight animated:YES];
Upvotes: 2
Views: 539
Reputation: 881
may I repeat, but it really helped me. In setting up my UIViewCollection i set:
prefetchingEnabled = NO
And this bug was not repeated and scrollItemAtIndexPath with animation works correct.
Upvotes: 1