Skip to content

Commit a851074

Browse files
rcancroOhKanghoon
authored andcommitted
[RTL] Guard access of flipsHorizontallyInOppositeLayoutDirection for iOS >= 11 (TextureGroup#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.
1 parent 9cbc55d commit a851074

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

Source/ASCollectionView.mm

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1859,8 +1859,11 @@ - (void)_beginBatchFetchingIfNeededWithContentOffset:(CGPoint)contentOffset velo
18591859
{
18601860
// Since we are accessing self.collectionViewLayout, we should make sure we are on main
18611861
ASDisplayNodeAssertMainThread();
1862-
1863-
if (ASDisplayShouldFetchBatchForScrollView(self, self.scrollDirection, self.scrollableDirections, contentOffset, velocity, self.collectionViewLayout.flipsHorizontallyInOppositeLayoutDirection)) {
1862+
BOOL flipsHorizontallyInOppositeLayoutDirection = NO;
1863+
if (AS_AVAILABLE_IOS(11.0)) {
1864+
flipsHorizontallyInOppositeLayoutDirection = self.collectionViewLayout.flipsHorizontallyInOppositeLayoutDirection;
1865+
}
1866+
if (ASDisplayShouldFetchBatchForScrollView(self, self.scrollDirection, self.scrollableDirections, contentOffset, velocity, flipsHorizontallyInOppositeLayoutDirection)) {
18641867
[self _beginBatchFetching];
18651868
}
18661869
}

0 commit comments

Comments
 (0)