We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4218eae commit 00a786bCopy full SHA for 00a786b
Sources/KIF/Additions/UIView-KIFAdditions.m
@@ -376,8 +376,7 @@ - (UIAccessibilityElement *)accessibilityElementMatchingBlock:(BOOL(^)(UIAccessi
376
}
377
378
@autoreleasepool {
379
- CGRect visibleRect = [collectionView layoutAttributesForItemAtIndexPath:indexPath].frame;
380
- [collectionView scrollRectToVisible:visibleRect animated:NO];
+ [collectionView scrollToItemAtIndexPath:indexPath atScrollPosition:UICollectionViewScrollPositionNone animated:NO];
381
[collectionView layoutIfNeeded];
382
UICollectionViewCell *cell = [collectionView cellForItemAtIndexPath:indexPath];
383
NSAssert(cell, @"UICollectionViewCell returned from 'cellForItemAtIndexPath' is unexpectedly nil!");
0 commit comments