Skip to content

How to set minimum height #37

Description

@jmrborges05

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

Activity

  1. AlexGladkov commented on Jan 17, 2017

    @AlexGladkov

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions