Skip to content

Commit

Permalink
Add bottom inset to offset calculation (#126)
Browse files Browse the repository at this point in the history
* Add bottom inset to offset calculation

* Update MagazineLayout/Public/MagazineLayout.swift

Co-authored-by: Bryan Keller <kellerbryan19@gmail.com>

* Update MagazineLayout/Public/MagazineLayout.swift

Co-authored-by: Bryan Keller <kellerbryan19@gmail.com>

---------

Co-authored-by: Elfred Pagan <elfred.pagan@airbnb.com>
Co-authored-by: Bryan Keller <kellerbryan19@gmail.com>
  • Loading branch information
3 people committed Mar 22, 2024
1 parent 281c390 commit b838d83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MagazineLayout/Public/MagazineLayout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ public final class MagazineLayout: UICollectionViewLayout {
if case .bottomToTop = verticalLayoutDirection {
invalidationContext.contentOffsetAdjustment = CGPoint(
x: 0.0,
y: currentCollectionView.bounds.height - newBounds.height)
y: currentCollectionView.bounds.height - newBounds.height + contentInset.bottom)
}

return invalidationContext
Expand Down

0 comments on commit b838d83

Please sign in to comment.