Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c UIViewAnimationTransitionUrl在左右方向_Objective C_Ios_Ipad_Uiviewanimationtransition - Fatal编程技术网

Objective c UIViewAnimationTransitionUrl在左右方向

Objective c UIViewAnimationTransitionUrl在左右方向,objective-c,ios,ipad,uiviewanimationtransition,Objective C,Ios,Ipad,Uiviewanimationtransition,是否有任何方法可以在左右方向使用UIViewAnimationTransitionUrl?我正在寻找与Contacts应用程序类似的东西: 如果您不介意将iOS 5作为一项要求,您可以使用新的 否则,您可以尝试以下方法: self.appDelegate = [[UIApplication sharedApplication] delegate]; UIViewController *srcViewController = (UIViewController *) self.sourceView

是否有任何方法可以在左右方向使用UIViewAnimationTransitionUrl?我正在寻找与Contacts应用程序类似的东西:


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

否则,您可以尝试以下方法:

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;

干杯….

如果您的目标是iOS 5,请使用。来自的实现UIViewController包容视频的最后十五分钟描述了如何使用它。

实际上,我想更改一个简单的UIView<代码>[UIView-setAnimationTransition:UIViewAnimationTransitionUrlUp-forView:rightPage缓存:是]这对UIView有效吗?