iphone:如何进行翻页
我面临一个月的问题,没有从谷歌找到任何东西。
我正在使用 UIView 进行 pdf 显示。 pdf没有问题,但转换有问题。我必须用真实的翻页经验来翻开pdf的每一页。我搜索、挖掘了很多相关内容,但我没有得到任何关于如何做到这一点的信息。
我不想使用任何 API,例如 codeflake 或任何其他 API。我只想通过自己的编程来做到这一点。
首先我读到这可以使用 cocos2d 或 CAAnimation 来完成,但我想知道如何做?因为我认为现实页面完全是 3D 概念。
让我知道大家该怎么做?
以下是示例视频:http://www.youtube.com/watch?v=oknMWvRO2XE
我想要动画,就像视频中一样......
I am facing the problem from a month and didn't find anything from google..
I am using UIView for pdf display. there is no problem with pdf but problem is with transition. I have to turn each page of pdf with realistic page turn exp. I search, dig a lot about that but i didn't get anything that how to do that.
I don't want to use any API'S like codeflake or any other. all i want to do this by my own programming.
First i read that this can be done using cocos2d or CAAnimation but i want to know how? b'coz realistic page i think so is completely 3d concept.
Let me know guys how to do thay??
here's the example video: http://www.youtube.com/watch?v=oknMWvRO2XE
I want animation just like in video....
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
以下是一些 iOS 页面卷曲/翻转效果的开源示例:
https://github.com/brow/leaves< /a> - 使用 CAGradientLayers 的简单效果。 (所有公共 API 调用)
https://github.com/steventroughtonsmith/PageCurlDemo - 使用 CAFilter(相同iBooks 中使用的方法,但这是一个私有 API 调用,如果您使用它,Apple 将拒绝您的应用程序)。这里可能有用的是计算接触角度的代码,它可以用来改进 Leaves 示例。
Here are a few open source examples of iOS page curl/flip effect:
https://github.com/brow/leaves - Simple effect using CAGradientLayers. (All public API calls)
https://github.com/steventroughtonsmith/PageCurlDemo - Uses CAFilter (The same method used in iBooks, but this is a private API call and Apple WILL reject your app if you use it). What might be useful here is the code for calculating the angle of touch, which could be used to improve the Leaves example.
LeavesView 组件得到了我的投票,我在商业交互式图书应用程序中使用它。如果您查看 GitHub 上的分支,您可以选择集成一些其他简洁的补丁。
它的集成非常简单,并且包含一些示例,其中包括 PDF 渲染示例。如果您愿意,您还可以在顶部添加交互层,这就是我所做的。
The LeavesView component gets my vote, I'm using it in a commercial interactive book application. If you check out the forks on GitHub, there are some other neat patches which you may choose to integrate.
Its pretty simple to integrate and includes a few examples, including a PDF rendering one. You can also add interactive layers on top if you wish, which is what I do.