Merge branch 'mkirk/fix-ios9-crash'

pull/1/head
Michael Kirk 6 years ago
commit d873ac278d

@ -571,7 +571,11 @@ typedef enum : NSUInteger {
self.collectionView.showsVerticalScrollIndicator = YES; self.collectionView.showsVerticalScrollIndicator = YES;
self.collectionView.showsHorizontalScrollIndicator = NO; self.collectionView.showsHorizontalScrollIndicator = NO;
self.collectionView.keyboardDismissMode = UIScrollViewKeyboardDismissModeInteractive; self.collectionView.keyboardDismissMode = UIScrollViewKeyboardDismissModeInteractive;
self.collectionView.prefetchingEnabled = NO; if (@available(iOS 10, *)) {
// To minimize time to initial apearance, we initially disable prefetching, but then
// re-enable it once the view has appeared.
self.collectionView.prefetchingEnabled = NO;
}
[self.view addSubview:self.collectionView]; [self.view addSubview:self.collectionView];
[self.collectionView autoPinEdgesToSuperviewEdges]; [self.collectionView autoPinEdgesToSuperviewEdges];
@ -1148,8 +1152,11 @@ typedef enum : NSUInteger {
[self autoLoadMoreIfNecessary]; [self autoLoadMoreIfNecessary];
if (!self.viewHasEverAppeared) { if (!self.viewHasEverAppeared) {
// Re-enable prefetching. // To minimize time to initial apearance, we initially disable prefetching, but then
self.collectionView.prefetchingEnabled = YES; // re-enable it once the view has appeared.
if (@available(iOS 10, *)) {
self.collectionView.prefetchingEnabled = YES;
}
// Now that we're using a "minimal" initial load window, // Now that we're using a "minimal" initial load window,
// try to increase the load window a moment after we've // try to increase the load window a moment after we've

Loading…
Cancel
Save