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

clipsToBounds prevents from having overflowing subviews #22

Open
lsale opened this issue Jan 7, 2018 · 4 comments
Open

clipsToBounds prevents from having overflowing subviews #22

lsale opened this issue Jan 7, 2018 · 4 comments

Comments

@lsale
Copy link

lsale commented Jan 7, 2018

I'm trying to use ParallaxHeader to create something like this.
but when I use snapkit with the blur+icon example to make half of the icon go beyond the bottom margin, the bottom half of the icon is clipped.

I'm using

roundIcon.snp.makeConstraints { make in
            make.left.equalToSuperview().offset(30)
            make.bottom.equalToSuperview().offset(50)
            make.width.height.equalTo(100)
        }

to align the round icon to the bottom left, like in the image above.
It seems that this code is responsible for the clipping but I understand it is necessary for the blur to happen nicely. Is there a workaround to have subviews go over the margin of the parallaxHeader?

Thanks!

@lsale lsale changed the title clipsToBounds prevents from having overflowing elements clipsToBounds prevents from having overflowing subviews Jan 7, 2018
@deepaksinghnegi
Copy link

Did you get any solution?

@lsale
Copy link
Author

lsale commented May 6, 2018

I didn't and unfortunately I never got a reply either so I’m looking into alternatives.

@wzbozon
Copy link
Contributor

wzbozon commented Sep 4, 2018

I solved this issue by forking ParallaxHeader, setting clipsToBounds to false and bringing by scrollViews contentView to the front by scrollView.bringSubview(toFront: contentView).

@wzbozon
Copy link
Contributor

wzbozon commented Sep 4, 2018

pod 'ParallaxHeader', git: 'https://github.com/wzbozon/ParallaxHeader'

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

3 participants