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

Top and bottom views not unfolding. #39

Open
jallenbrown opened this issue Dec 21, 2012 · 3 comments
Open

Top and bottom views not unfolding. #39

jallenbrown opened this issue Dec 21, 2012 · 3 comments

Comments

@jallenbrown
Copy link

When I call either:

 [self.paperFoldView setPaperFoldState:PaperFoldStateTopUnfolded];

 or 

 [self.paperFoldView setPaperFoldState:PaperFoldStateBottomUnfolded];

the unfolding animation never happens and it gets stuck in a never ending loop inside

 - (void)unfoldTopView:(NSTimer*)timer 

 or

 - (void)unfoldBottomView:(NSTimer*)timer 

At first glance it looks like the transform.ty is not being updated so the frame height never changes. Not sure where to go from here.

@funkyboy
Copy link
Contributor

funkyboy commented Jan 3, 2013

Been digging a bit. Looks like ty is always 0.

- (void)unfoldTopView:(NSTimer*)timer { [self.topFoldView setHidden:NO]; [self.bottomFoldView setHidden:NO]; [self.leftFoldView setHidden:YES]; [self.rightFoldView setHidden:YES]; CGAffineTransform transform = [self.contentView transform]; float y = transform.ty + (self.topFoldView.frame.size.height-transform.ty)/8; NSLog(@"ty is: %g ", transform.ty); ... }

Any hint?

@funkyboy
Copy link
Contributor

funkyboy commented Jan 3, 2013

Send a pull request.
Don't know if it's the most "correct" way to solve it but it works.

@amanstein
Copy link

don't know why, but just setting topViewPullFactor = 0 works!
e.g.

[_paperFoldView setTopFoldContentView:self.topContentView
topViewFoldCount:3
topViewPullFactor:0];

honcheng added a commit that referenced this issue Jan 8, 2013
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