HPParallaxHeader
HPParallaxHeader copied to clipboard
[BUG] delegate parallaxHeaderDidScroll is called before scrolling
parallaxHeaderDidScroll
method return strange values even before my scrolling.(when initialized?)
func parallaxHeaderDidScroll(_ parallaxHeader: HPParallaxHeader) {
var progress = parallaxHeader.progress
print(progress)
}
In the first loaded view controller.
it logged 1
, 0
before scrolling.
Hi, at the first time loading the parallax header is expand so progress = 1 is correct. Moreover, at the first time loading the scrollview has to layout its content and change it content offset to expand the parallax header so the callback has to be triggered. So this should not be considered as bug.
1 is correct
but, 0
also returned after 1
automatically.
[1.0]
[0.0]
SPEC: 15.3.1, iPhone 12
I can't reproduce the bug. Could you send me sample project?
It is first time. after build.
Strangely, other spec iPhone returns 1
only.
But it returns more than 1 in the first time.
SPEC: 14.8 iPhone, 14.8
Could you send me sample project?
unfortunately it is big project.
But it returns more than 1 in the first time. => this is because when we set parallax header's height and minimumHeight the contentOffset of the scrollview is not updated yet causing the progress to be > 1 at first time loading. So this will not be considered as bug.
1 is correct but,
0
also returned after1
automatically.[1.0] [0.0]
SPEC: 15.3.1, iPhone 12
=> about this I still haven't been able to reproduced it yet. Could you make a minimal sample apart from your project so I can take a look?