Does Core Animation provide public APIs for iBook style page curl page transitions?

独自空忆成欢 提交于 2019-12-08 00:51:28

问题


Does Core Animation provide public APIs for iBook style page curl page transitions? I have seen this blog post which is an almost exact re-engineering of iBook page-curl transitions but it relies on private APIs.

Is there in fact a public version and if not is there something in open source?


回答1:


Check the answer for Flipboard or iBooks style animation the code is available @ GitHub.




回答2:


If you want to roll your own solution with OpenGL ES, I've written an introduction to simulating a page curl using a conical deformation algorithm. While it's probably not the same solution Apple uses, it looks pretty realistic and can handle the general case of viewing the animation from any angle, not just straight on.

Since it's pure OpenGL and doesn't rely on any private APIs, it's also portable to other platforms other than iPhone OS.

While the curling itself is trivial to implement, you'll need to write your own finger tracking code if you want an interactive animation, which is a bit more complicated.




回答3:


No. iBooks uses tons of private APIs, including this page curl transition.

The only page-curl related animation you could use are the full-page UIViewAnimationTransitionCurlUp and Down transitions, and the half-page UIModalTransitionStylePartialCurl.



来源:https://stackoverflow.com/questions/2836813/does-core-animation-provide-public-apis-for-ibook-style-page-curl-page-transitio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!