XBPageCurl icon indicating copy to clipboard operation
XBPageCurl copied to clipboard

XBPageDragView curl with tap

Open m-lancieri opened this issue 11 years ago • 1 comments

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

m-lancieri avatar Jul 04 '13 14:07 m-lancieri

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;
}

xissburg avatar Oct 04 '13 13:10 xissburg