Skip to content

Commit

Permalink
fix(ios): scrollOffsetPercentage for end of content size
Browse files Browse the repository at this point in the history
  • Loading branch information
farfromrefug committed Aug 7, 2021
1 parent 2ba7b74 commit d9c3abe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/collectionview/collectionview.ios.ts
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ export class CollectionView extends CollectionViewBase {
}
scrollViewDidScroll(scrollView: UIScrollView): void {
const offset = this.isHorizontal() ? scrollView.contentOffset.x : scrollView.contentOffset.y;
const size = this.isHorizontal() ? scrollView.contentSize.width : scrollView.contentSize.height;
const size = this.isHorizontal() ? scrollView.contentSize.width - scrollView.bounds.size.width : scrollView.contentSize.height - scrollView.bounds.size.height;
this.notify({
object: this,
eventName: CollectionViewBase.scrollEvent,
Expand All @@ -897,7 +897,7 @@ export class CollectionView extends CollectionViewBase {
}
scrollViewDidEndDecelerating(scrollView: UIScrollView) {
const offset = this.isHorizontal() ? scrollView.contentOffset.x : scrollView.contentOffset.y;
const size = this.isHorizontal() ? scrollView.contentSize.width : scrollView.contentSize.height;
const size = this.isHorizontal() ? scrollView.contentSize.width - scrollView.bounds.size.width : scrollView.contentSize.height - scrollView.bounds.size.height;
this.notify({
object: this,
eventName: CollectionViewBase.scrollEndEvent,
Expand Down

0 comments on commit d9c3abe

Please sign in to comment.