OGeek|极客世界-中国程序员成长平台

标题: iOS 页面 curl 动态过渡 View [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 12:29
标题: iOS 页面 curl 动态过渡 View

我正在寻找一种方法来实现 View 之间的页面 curl 过渡。基本上,我有一个 View Controller ,其中有一本书。我要实现书的打开和页面之间的过渡。

我知道 UIPageViewController 的存在,它是页面 curl 过渡样式,我正在寻求实现类似的东西,只应用于 View 。 (在我的 View Controller 上,除了本书之外,我还有其他 View 和按钮。)

我应该能够用手指来回移动页面并能够放开它。



Best Answer-推荐答案


1) 为要转换的所有 View 创建一个 Controller 数组。

NSArray *array = [NSArray arrayWithObjects:vc1, vc2, vc3,...];

2) 然后将 View Controller 数组添加到您的 UIPageViewController 对象中。

[yourPageController setViewControllers:array direction:UIPageViewControllerNavigationDirectionForward animated:YES completion:nil];

更多引用- http://www.techotopia.com/index.php/An_Example_iOS_5_iPhone_UIPageViewController_Application

有关其他详细信息,请阅读 Apple 的文档

http://developer.apple.com/library/ios/#documentation/uikit/reference/UIPageViewControllerClassReferenceClassRef/UIPageViewControllerClassReference.html

关于iOS 页面 curl 动态过渡 View ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17558946/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4