3

I'm trying recreate iBook like transition for pages in landscape mode for an pdf reader app. I only need the animation, not the, touch handling like iBook app; the user with a simple swipe turn the page. I have tried different sample code, including Leaves, but I can't find anything simple. Can Anyone help me to create this simple animation, or there's a simple way to recreate iBook transition?

AnthoPak
  • 4,191
  • 3
  • 23
  • 41
Pablosproject
  • 1,374
  • 3
  • 13
  • 33

2 Answers2

4

Ole Begemann has done something like this. You can find the project here on GitHub.

Ole also writes a superb blog summary of some of the best developer links and tutorials around. Well worth subscribing to!

Max MacLeod
  • 26,115
  • 13
  • 104
  • 132
  • I don't want to use the Leaves framework because I only need the animation, I don't need to track the touch of the user. I only need the animation of the flipping page. – Pablosproject Apr 27 '11 at 14:25
  • 1
    It shouldn't be too hard to use it without the touch tracking. You could remove that part of the code and replace it with an animation curve. – Max MacLeod Apr 27 '11 at 14:56
0

Look at the UIView documentation for animation types available. Here is what I'd use:

UIViewAnimationOptions animation;
if (pageNumberLower) {
    animation = UIViewAnimationOptionTransitionCurlDown;
} else {
    animation = UIViewAnimationOptionTransitionCurlUp;
}

[UIView transitionWithView:myChangingView
                  duration:0.5
                   options:animation
                animations:^{ CHANGE PAGE HERE }
                completion:NULL];
Dancreek
  • 9,524
  • 1
  • 31
  • 34