We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 807b813 + db5a6a0 commit f018533Copy full SHA for f018533
Sources/ContentScrollView.swift
@@ -30,7 +30,11 @@ open class ContentScrollView: UIScrollView {
30
return min(lastIndex, i)
31
}()
32
33
- guard nextPageIndex > previousPageIndex else { return nil }
+ // MARK: 見えるページビューの判定
34
+ /// - ページが一つしかない場合、`nextPageIndex`と`previousPageIndex`は等しくて共に`0`と想定されます。
35
+ /// - 複数のページがある場合、`preloadingPageCount`が`0`の場合:`nextPageIndex`と`previousPageIndex`は等しいと想定されます。
36
+ /// - 複数のページがある場合、`preloadingPageCount`が`1`以上の場合:`nextPageIndex`は`previousPageIndex`より大きいと想定されます。
37
+ guard nextPageIndex >= previousPageIndex else { return nil }
38
return previousPageIndex...nextPageIndex
39
}
40
0 commit comments