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

XBPageDragView curl with tap #54

Open
m-lancieri opened this issue Jul 4, 2013 · 1 comment
Open

XBPageDragView curl with tap #54

m-lancieri opened this issue Jul 4, 2013 · 1 comment

Comments

@m-lancieri
Copy link

Hi,
as in the example I created a dragview to curl a view, it works perfectly.
I want it to curl not only with the swipe but also with the tap, so I put a tap gesture recognizer on dragview, which method do I call to bend it?

Thanks

@xissburg
Copy link
Owner

xissburg commented Oct 4, 2013

You should call - [XBCurlView curlView:cylinderPosition:cylinderAngle:cylinderRadius:animatedWithDuration:], as you can see in SimpleCurlViewController.m:

- (IBAction)curlButtonAction:(id)sender
{
    CGRect r = self.messyView.frame;
    self.curlView.opaque = NO; //Transparency on the next page (so that the view behind curlView will appear)
    self.curlView.pageOpaque = YES; //The page to be curled has no transparency
    [self.curlView curlView:self.messyView cylinderPosition:CGPointMake(r.size.width/3, r.size.height/2) cylinderAngle:M_PI_2+0.23 cylinderRadius:UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPad? 80: 50 animatedWithDuration:kDuration];
    isCurled = YES;
}

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