arachide
arachide

Reputation: 8076

Is it possible to do transition between 2 views belong to different UIViewController?

I used navigationController to push and pop 2 viewcontrollers. But I hope to do transition (just like CATransition fade) with 5 seconds interval between the views of the 2 viewcontrollers. Is it possible?

Welcome any comment

Thanks

interdev

Upvotes: 2

Views: 260

Answers (1)

Nathan de Vries
Nathan de Vries

Reputation: 15501

You can use a CATransition like so:

CATransition* transition = [CATransition animation];
transition.duration = 5.0;
transition.type = kCATransitionFade;

[self.navigationController.view.layer addAnimation:transition 
                                            forKey:kCATransition];

[self.navigationController pushViewController:self.alternateView
                                     animated:NO];

Upvotes: 2

Related Questions