Open markst opened 11 months ago
Appears the UIScrollView.reachedBottomPublisher offset is not working as expected.
UIScrollView.reachedBottomPublisher
Currently the threshold is calculated by using max bracketing on offset of calculating the y to compare using visible height:
threshold
let threshold = max(offset, self.contentSize.height - visibleHeight)
However in order for this to work the publisher would have to be setup as:
collectionView .reachedBottomPublisher(collectionView.contentSize.height - visibleHeight - offset) .sink {
Which I don't believe is correct given when dynamically inserting content the content size will change.
I believe the threshold needs to be calculated considering the offset such as:
let threshold = (self.contentSize.height - visibleHeight) - offset
Appears the
UIScrollView.reachedBottomPublisher
offset is not working as expected.Currently the
threshold
is calculated by using max bracketing on offset of calculating the y to compare using visible height:However in order for this to work the publisher would have to be setup as:
Which I don't believe is correct given when dynamically inserting content the content size will change.