iXcoder
iXcoder

Reputation: 1564

how to implement the foldout animation view like the original iPhone google map app?

all coder , I see the foldout animation view in the original iPhone google map app, I want the same effect in my view , but I have not find solution ...

how to do the same animation via iPhone sdk ? any tip will be much appreciated...

thanks...

iRobin

Upvotes: 1

Views: 366

Answers (1)

Brad Larson
Brad Larson

Reputation: 170317

I believe that what you're looking for is UIViewAnimationTransitionCurlUp and UIViewAnimationTransitionCurlDown, two transition effects that can be applied when switching views. To produce the effect, you could use code like the following:

[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:CURLANIMATIONDURATIONFORSWITCHINGVIEWS];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:self.view cache:YES];

[newlyVisibleController viewWillAppear:YES];
[previouslyVisibleController viewWillDisappear:YES];
[previouslyVisibleController.view removeFromSuperview];
[self.view addSubview:newlyVisibleController.view];
[previouslyVisibleController viewDidDisappear:YES];
[newlyVisibleController viewDidAppear:YES];

[UIView commitAnimations];

Upvotes: 1

Related Questions