Skip to content
This repository was archived by the owner on Jan 17, 2019. It is now read-only.

Commit ba4470a

Browse files
author
Nataliya Patsovska
committed
Remove code that is reseting the content offset when insets change
1 parent 6516b98 commit ba4470a

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

sources/HUBViewController.m

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,14 +1141,8 @@ - (void)adjustCollectionViewContentInsetWithProposedTopValue:(CGFloat)topContent
11411141
contentInsets = [self.scrollHandler contentInsetsForViewController:self
11421142
proposedContentInsets:contentInsets];
11431143

1144-
if (!UIEdgeInsetsEqualToEdgeInsets(self.collectionView.contentInset, contentInsets)) {
1145-
self.collectionView.contentInset = contentInsets;
1146-
CGPoint contentOffset = self.collectionView.contentOffset;
1147-
contentOffset.y = -contentInsets.top;
1148-
[self setContentOffset:contentOffset animated:NO];
1149-
}
1150-
1151-
self.collectionView.scrollIndicatorInsets = self.collectionView.contentInset;
1144+
self.collectionView.contentInset = contentInsets;
1145+
self.collectionView.scrollIndicatorInsets = contentInsets;
11521146
}
11531147

11541148
- (void)collectionViewCellWillAppear:(HUBComponentCollectionViewCell *)cell

0 commit comments

Comments
 (0)