PaperFold-for-iOS icon indicating copy to clipboard operation
PaperFold-for-iOS copied to clipboard

Top and bottom views not unfolding.

Open jallenbrown opened this issue 12 years ago • 3 comments

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.

jallenbrown avatar Dec 21 '12 00:12 jallenbrown

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 avatar Jan 03 '13 13:01 funkyboy

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

funkyboy avatar Jan 03 '13 19:01 funkyboy

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

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

amanstein avatar Jan 08 '13 13:01 amanstein