Skip to content

Bug in ScrollViewWithStickyHeader when navigationBarHeight is greater than headerMinHeight #24

Closed
@dusiema

Description

@dusiema

I think, I found a bug in ScrollViewWithStickyHeader for cases where the navigationBarHeight is greater than the specified headerMinHeight.

navigationBarHeight is determined from proxy.safeAreaInsets.top and depends on the iPhone model (and if it has a notch or an island or neither).

There is a preview in ScrollViewWithStickyHeader which sets the headerMinHeight to 150 currently.
When you set it to e.g. 60 the error appears. Then the frame of the clear color determines the height of the sticky header and not the defined headerMinHeight.

A fix is to only set the height of the clear color when headerMinHeight is not set. I'll provide a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions