Skip to content

Commit

Permalink
[RTL] Guard access of flipsHorizontallyInOppositeLayoutDirection for …
Browse files Browse the repository at this point in the history
…iOS >= 11 (#2003)

`flipsHorizontallyInOppositeLayoutDirection` is available in iOS11 and greater. Texture still supports iOS9 so we need to make sure not to call this it in those cases.
  • Loading branch information
rcancro authored Jun 3, 2021
1 parent 18d805f commit 03e7d1f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Source/ASCollectionView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1859,8 +1859,11 @@ - (void)_beginBatchFetchingIfNeededWithContentOffset:(CGPoint)contentOffset velo
{
// Since we are accessing self.collectionViewLayout, we should make sure we are on main
ASDisplayNodeAssertMainThread();

if (ASDisplayShouldFetchBatchForScrollView(self, self.scrollDirection, self.scrollableDirections, contentOffset, velocity, self.collectionViewLayout.flipsHorizontallyInOppositeLayoutDirection)) {
BOOL flipsHorizontallyInOppositeLayoutDirection = NO;
if (AS_AVAILABLE_IOS(11.0)) {
flipsHorizontallyInOppositeLayoutDirection = self.collectionViewLayout.flipsHorizontallyInOppositeLayoutDirection;
}
if (ASDisplayShouldFetchBatchForScrollView(self, self.scrollDirection, self.scrollableDirections, contentOffset, velocity, flipsHorizontallyInOppositeLayoutDirection)) {
[self _beginBatchFetching];
}
}
Expand Down

0 comments on commit 03e7d1f

Please sign in to comment.