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

Disable stretchy header effect. #4

Closed
brightroots7 opened this issue Apr 11, 2020 · 1 comment
Closed

Disable stretchy header effect. #4

brightroots7 opened this issue Apr 11, 2020 · 1 comment

Comments

@brightroots7
Copy link

How to disable the stretchy header while scrolling down,

@OfTheWolf
Copy link
Owner

@brightroots7 you can play with the headerFrame in MasterViewController.swift. You can remove first if statement "scrollView.contentOffset.y < 0 block". See below.

MasterViewController.swift. Lines between 138 - 141
        if scrollView.contentOffset.y < 0{
//            headerView.frame = CGRect(x: headerView.frame.minX,
//                                      y: min(topHeight, scrollView.contentOffset.y),
//                                      width: headerView.frame.width,
//                                      height: max(dataSource.headerHeight().lowerBound, dataSource.headerHeight().upperBound + -scrollView.contentOffset.y))

        }else{
            headerView.frame = CGRect(x: headerView.frame.minX,
                                      y: 0,
                                      width: headerView.frame.width,
                                      height: dataSource.headerHeight().upperBound)
        }

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

No branches or pull requests

2 participants