Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore top safe area insets if needed & SPM support. #56

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

MussaCharles
Copy link

@MussaCharles MussaCharles commented Sep 4, 2021

Ignore Safe Areas

Issue: Safe area is been used to pin contentView without taking into consideration some of other custom layouts, for example having an imageView as header covering the whole navBar including safeAreas.

This PR adds an optional flag were users can set it to true if their headers fill the whole safe area.

 /// This is to support a usecase where a parallax header is being used at the very top edge of the screen.
/// If this is set to true then the header will be pinned at the top of the scrollView. Default value is `false`
    public var ignoreTopSafeAreaInset:Bool = false

Usage:
myScrollview.parallaxHeader.ignoreTopSafeAreaInset = true

Swift Package Manager (SPM)

This PR also includes SPM support without any changes to source code structure. Only a package manifest file is added which points to the right source files.

Note: The reason to include SPM support on a single PR is because I am using this branch in my project.

@MussaCharles MussaCharles changed the title Ignore top safe area insets if needed for headers which cover the whole NavigationBar. Ignore top safe area insets if needed & SPM support. Oct 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants