user1573321
user1573321

Reputation:

How can we animate the ipad view like a book

I want to animate the view in ipad like a book, view should be turned like a page from right to left and vice versa. Can anyone provide me any tutorial or example for this.

Thanks in advance.

Upvotes: 1

Views: 141

Answers (3)

user1573321
user1573321

Reputation:

check link

UIPageViewController

Upvotes: 1

ESoft
ESoft

Reputation: 862

You want to use the UIPageViewController
See e.g. this tutorial

Upvotes: 2

coder
coder

Reputation: 5390

 CATransition *animation = [CATransition animation];
        [animation setDelegate:self];
        [animation setDuration:1.0f];
        animation.startProgress = 0.2;
        animation.endProgress   = 1;
        [animation setTimingFunction:UIViewAnimationCurveEaseInOut];
        [animation setType:@"pageCurl"];

        [animation setSubtype:kCATransitionFromLeft];

        [animation setFillMode: kCAFillModeBackwards];
[self.view.layer addAnimation:animation forKey:@"animation"];

for flipping the other way you make :

 [animation setType:@"pageUnCurl"];

Hope this helps, good luck :)

Upvotes: 1

Related Questions