Iphone: how to make a page turn

I ran into a problem from a month and did not find anything from google.

I am using UIView to display in pdf format. there are no problems with pdf, but the problem is with the transition. I have to turn every pdf page with realistic page speed. I am looking, digging a lot, but I did not understand anything how to do it.

I do not want to use any API like codeflake or any other. all i want to do is with my own programming.

At first I read that this can be done using cocos2d or CAAnimation, but I want to know how? b'coz realistic page, I think this is a fully 3D concept.

Let me know guys how to do this?

here is an example video: http://www.youtube.com/watch?v=oknMWvRO2XE

I need animation like in the video ....

+3
source share
2 answers

Here are some open source examples for the 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 by iBooks, but this is a private API call and Apple will reject your application if you use it). What may be useful here is code for calculating the angle of contact, which can be used to improve the example of Sheets.

+3
source

LeavesView , . GitHub, , .

, PDF-. , , .

0

Source: https://habr.com/ru/post/1743875/


All Articles