我想知道是否有机会在视图之间创建自定义过渡动画,作为“立方体”: http ://www.pendrivelinux.com/wp-content/uploads/pdl-cubed.jpg
我看了一些例子,没有任何成功,你知道一些,甚至可能吗?
谢谢
我想知道是否有机会在视图之间创建自定义过渡动画,作为“立方体”: http ://www.pendrivelinux.com/wp-content/uploads/pdl-cubed.jpg
我看了一些例子,没有任何成功,你知道一些,甚至可能吗?
谢谢
UIViewController* viewCtrl = [[UIViewController alloc] init];
CATransition *transition = [CATransition animation];
transition.duration = 1;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = @"cube"; //Note: undocumented API, will probably cause App Store rejection
transition.subtype = kCATransitionFromLeft;
transition.delegate = self;
[self.navigationController.view.layer addAnimation:transition forKey:nil];
self.navigationController.navigationBarHidden = NO;
[self.navigationController pushViewController:viewCtrl animated:YES];
[viewCtrl release];
这应该是可能的。您需要有 2 个视图和一些 Core Animation 3D 变换。