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

How to set minimum height #37

Open
jmrborges05 opened this issue Jan 25, 2016 · 1 comment
Open

How to set minimum height #37

jmrborges05 opened this issue Jan 25, 2016 · 1 comment

Comments

@jmrborges05
Copy link

Hello,
i need to set minimum height to parallax view. How do i set the minimum height ?
Thanks

@AlexGladkov
Copy link

AlexGladkov commented Jan 17, 2017

Find function called - (void) positionScrollViewParallaxHeader (or the same for tableView) and pass minHeight(CGFloat) to this func. After that replace code of this function to this

CGFloat height = self.contentOffset.y * -1;
CGFloat scaleProgress = fmaxf(0, (height / (self.parallaxHeader.originalHeight + self.parallaxHeader.originalTopInset)));
self.parallaxHeader.progress = scaleProgress;
self.parallaxHeader.frame = CGRectMake(0, self.contentOffset.y, CGRectGetWidth(self.frame), MAX(height, minHeight));

where minHeight is your minHeight and use it )
You are free to asking me for full code if you need

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