Reputation: 1564
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
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