onReachedBoundary is not called if edgesIgnoringSafeArea is set
akolov opened this issue · comments
Describe the bug
onReachedBoundary
is not called if edgesIgnoringSafeArea
is set, however not using edgesIgnoringSafeArea
causes large navigation title not to collapse properly.
I believe it's related to this line of code:
It mentions that SwiftUI is using negative adjusted top inset, however for me it's positive at 88.0.
Which results in this condition to fail:
scrollView.contentSizePlusInsets.height
is less than scrollView.frame.size.height
:
(lldb) po scrollView.contentSizePlusInsets.height
679.0
(lldb) po scrollView.frame.size.height
729.0
Maybe this behaviour has been changed by iOS 13.5, since boundary is correctly reached when I change to use adjustedContentInset.top
?
To Reproduce
Steps to reproduce the behaviour:
ASCollectionView { ... }
.onReachedBoundary { ... }
.edgesIgnoringSafeArea(.top) // or .all
Expected behaviour
onReachedBoundary
is called regardless whether edgesIgnoringSafeArea
is set
Xcode Version:
- 11.5 (11E608c)
Simulator, Device, Both?
- Both simulator and device running iOS 13.5
Thank you for the PR