UIViewAnimationTransitionCurl在左右方向

时间:2012-02-03 22:33:08

标签: objective-c ios ipad uiviewanimationtransition

有没有办法在左右方向使用UIViewAnimationTransitionCurl?我正在寻找类似于联系人应用程序的东西:

enter image description here

2 个答案:

答案 0 :(得分:2)

如果您的目标是iOS 5,请使用UIPageViewController。来自WWDC 2011实施UIViewController Containment 视频的最后十五分钟描述了如何使用它。

答案 1 :(得分:0)

如果您不介意iOS 5作为要求,可以使用新的UIPageViewController

否则你可以尝试这样的事情:

self.appDelegate = [[UIApplication sharedApplication] delegate];
UIViewController *srcViewController = (UIViewController *) self.sourceViewController;
UIViewController *destViewController = (UIViewController *) self.destinationViewController;
[UIView commitAnimations];
[UIView beginAnimations:@"View Flip" context:nil];
[UIView setAnimationDuration:1.25];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationTransition: UIViewAnimationTransitionFlipFromRight forView:self.appDelegate.window.rootViewController.view.superview cache:YES];
[srcViewController.view removeFromSuperview];
[UIView commitAnimations];
[self.appDelegate.window addSubview:destViewController.view];
self.appDelegate.window.rootViewController=destViewController;

...干杯