Iphone UIPageViewController代码的部分卷曲
是否有可能使用UIPageViewController从代码中部分卷曲页面。我想向用户展示他能够更改页面,为了做到这一点,我想部分卷曲页面并将其放回原处(轻轻向左然后向右滑动,这将是用户的输入以获得此效果,但我希望它来自代码)。您需要使用Iphone UIPageViewController代码的部分卷曲,iphone,ios,xcode,uipageviewcontroller,Iphone,Ios,Xcode,Uipageviewcontroller,是否有可能使用UIPageViewController从代码中部分卷曲页面。我想向用户展示他能够更改页面,为了做到这一点,我想部分卷曲页面并将其放回原处(轻轻向左然后向右滑动,这将是用户的输入以获得此效果,但我希望它来自代码)。您需要使用UIViewAnimationTransitionCurlUp。检查下面的示例 - (void)handleSwipe:(UISwipeGestureRecognizer *)sender { if(sender.state == UIGestureRecog
UIViewAnimationTransitionCurlUp
。检查下面的示例
- (void)handleSwipe:(UISwipeGestureRecognizer *)sender {
if(sender.state == UIGestureRecognizerStateEnded) {
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.3];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:window cache:YES];
[self.view addSubview:[newView view]];
[oldView removeFromSuperview];
[UIView commitAnimations];
}
}
- (void)createGestureRecognizers:(UIView *) target {
UISwipeGestureRecognizer *rightSwipeRecognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipe:)];
[rightSwipeRecognizer setDirection:(UISwipeGestureRecognizerDirectionRight)];
[target addGestureRecognizer:rightSwipeRecognizer];
[rightSwipeRecognizer release];
}
这根本不是我想要的。我想弯曲页面以反映它可以通过滑动手势进行更改。我不想用一些动画来改变视图。我也想要这个!UIViewAnimationTransitionUrlUp无法解决此问题。也许有什么方法可以在过渡时伪造手势识别器?你发现有用的东西了吗?