Custom UIViewAnimationTransition on iPad

I am wondering if it is possible to create a custom transition animation between Views, like a “cube”: http://www.pendrivelinux.com/wp-content/uploads/pdl-cubed.jpg

I looked at some example, without any success, do you know, maybe even?

thank

+3
source share
2 answers
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];
+4
source

It should be possible. You will need to have 2 views and some Core Animation 3D transformations.

+1
source

Source: https://habr.com/ru/post/1772433/


All Articles