问题
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