teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

追記

2020/03/09 06:57

投稿

hoshi-takanori
hoshi-takanori

スコア7903

answer CHANGED
@@ -3,4 +3,12 @@
3
3
  以下、[API ドキュメント](https://developer.apple.com/documentation/uikit/uicollectionviewdatasourceprefetching) の引用です。
4
4
 
5
5
  > Note
6
- The prefetch method is not necessarily called for every cell in the table view. See Loading Data Asynchronously for details on a suggested approach to loading data.
6
+ The prefetch method is not necessarily called for every cell in the table view. See Loading Data Asynchronously for details on a suggested approach to loading data.
7
+
8
+ ---
9
+
10
+ 自分で検証用プロジェクトを作って試してみたところ、collectionView の collectionViewLayout を設定したら呼ばれるようになりました。
11
+
12
+ ```swift
13
+ collectionView.collectionViewLayout = UICollectionViewFlowLayout()
14
+ ```