gpt4 book ai didi

iphone - 翻页动画到多个作业

转载 作者:行者123 更新时间:2023-11-29 04:17:55 25 4
gpt4 key购买 nike

我正在开发一个包含许多 View Controller 的项目,在单独的 xib 中显示不同的控件和图像。我需要使用翻页动画浏览这些 View (Xibs)。如有任何帮助,我们将不胜感激。

下面的代码为我提供了页面 curl 动画,但我需要如树叶中所示的翻页效果。

-(void)swipeLeftGesture:(UISwipeGestureRecognizer *)发送者{

pp2ViewController * viewController = [[pp2ViewController alloc] initWithNibName:@"pp2ViewController" bundle:nil];
[UIView transitionWithView:self.view.window
duration:1.0f
options:UIViewAnimationOptionTransitionCurlUp
animations:^{
//[self.navigationController pushViewController:viewController animated:NO];

[self presentViewController:viewController animated:NO completion:nil];
}
completion:NULL];

最佳答案

通过将 UIPageViewControllerUIPageViewControllerTransitionStylePageCurl 过渡样式结合使用,您将获得最佳结果。

页面 View Controller 有一个很好的 API,可以处理创建/销毁 View Controller 以及管理旋转、滚动/分页转换等许多困惑的工作。

关于iphone - 翻页动画到多个作业,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13415822/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com