Page curl left and right transitions

Discussion in 'iOS Programming' started by venkateshf1, Apr 28, 2010.

  1. venkateshf1 macrumors newbie

    Joined:
    Apr 27, 2010
    #1
    I am working on a epub book reader application and displaying the contents of
    book in web view and i want to give a page curl left and right transitions effect for that, just a turning the page of a real book. I couldnt find any tutorials for that .Any help is appreciated
     
  2. boyplunder macrumors regular

    boyplunder

    Joined:
    Sep 8, 2008
    Location:
    UK
    #2
    I haven't had the chance to look this up yet, but I think they are undocumented animations:

    UIViewAnimationTransitionCurlUp
    UIViewAnimationTransitionCurlDown

    As far as I can recall, they are part of the UIView class.
     
  3. boyplunder macrumors regular

    boyplunder

    Joined:
    Sep 8, 2008
    Location:
    UK
    #3
    Have just re-read your post and not sure this is quite what you were after. I do know that some apps use openGL to do it, which must be quite a bit of work. I don't think there is a transition that emulates a page turn.
     
  4. venkateshf1 thread starter macrumors newbie

    Joined:
    Apr 27, 2010
    #4
    Is that animations possible by doing openGL?? I saw a app named "stanza" there they did those left and right transitions
     
  5. boyplunder macrumors regular

    boyplunder

    Joined:
    Sep 8, 2008
    Location:
    UK
    #5
    Here is an example of the work by someone else using OpenGL I saw a while ago. I haven't looked into this or tried anything out, but it is interesting all the same.

    http://www.iphonepageflip.com/
     
  6. venkateshf1 thread starter macrumors newbie

    Joined:
    Apr 27, 2010
    #6
    Thank you. i think this video will give me some idea.if you got some other article regarding these animations please intimate me.
     
  7. flyingturtle macrumors regular

    Joined:
    Apr 7, 2010
    #7
    I came across this blog article about deconstructing the page turning effect in the "Classics" app.
    http://darknoon.com/blog/2008/12/08/deconstructing-classicsapp/

    The author takes it apart and surprisingly discovers that it wasn't via opengl and also makes some discoveries on how they were able to apply effects to text.

    Alternatively if you want to learn Cocos2d which is a 2d game engine OpenGL ES framework, they have a page transition animation, as part of their library now since version 0.8.2
    http://code.google.com/p/cocos2d-ip...os2d/PageTurnTransition.m?spec=svn1349&r=1349

    It was released in version 0.8.2 (see under "new features" in this wiki page)
    http://www.cocos2d-iphone.org/wiki/doku.php/release_notes:0_8_2_beta

    One note about the cocos2d page transition, you may want to check it out first before going through the effort of learning cocos2d as the effect may not be to your liking. It is not as nice as those examples. In order to see it, you'll have to go through some hurdles, as you'll have to download cocos2d, install it and then run the cocos2d tests (the "TransitionTest" test has the page turn transition among others). I already have Cocos2d installed, but it took me sometime to find out how to run tests, until I found these instructions.
    http://www.cocos2d-iphone.org/archives/663

    I wish I knew OpenGL ES better or even Core Animation, or I'd try to code my own. I've been looking at Cocos2d to see if it could be shortcut to work with OpenGL. The math involved isn't hard, I just need a good grasp on ways to rotate and mask layered images for the iPhone.
     

Share This Page