Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7690213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:20:40+00:00 2026-05-31T20:20:40+00:00

I am looking to build an app that has 6 view controllers laid out

  • 0

I am looking to build an app that has 6 view controllers laid out in a cube structure (instead of having a tab bar for navigation…). I used this example to make the cube transitions: switch two view controller's view in a cube animation

However, most of the examples (another one: how does the CATransition work?) show how to transition between UIViews rather than UIViewControllers, which is what I am interested in.

My questions are: how do I use CATransition to transition between UIViewControllers, and also – how do I go back from one UIViewController to another assuming that I am using the pushViewController: method (so far I have been using presentModalViewController: and get back (say, for cancel) used this method dismissModalViewControllerAnimated:).

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T20:20:41+00:00Added an answer on May 31, 2026 at 8:20 pm

    You cannot use CATransition to switch between two view controllers, but you can simply use the view controller’s view and switch it with another view controller’s view.

    iOS 5 made transitioning with UIViewControllers easier as it introduces the transitionFromViewController:toViewController:duration:options:animations:completion: method.

    In the end, you’ll still be using the UIViews of the UIViewControllers.

    (Actually, the link you provided is exactly how you transition between two UIViewControllers. Remember, view controllers only manage views and aren’t really views themselves. Switching back won’t be as easy as dismissModalViewControllerAnimated: but sometimes customization isn’t easy).

    Here’s an example with using the iOS 5 method:

    UIViewController *controller = [[UIViewController alloc] initWithNibName:nil bundle:nil];
    [controller.view setBackgroundColor:[UIColor greenColor]];

    [self addChildViewController:controller];
    
    [self transitionFromViewController:self.redController toViewController:controller duration:0.8 options:0 animations:^{
        CATransition *transition = [CATransition animation];
        transition.delegate = self;
        transition.duration = 0.8;
        transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
        NSString *types[4] = {@"cube", @"rippleEffect", @"cube", @"alignedCube"};
        NSString *subtypes[4] = {kCATransitionFromLeft, kCATransitionFromRight, kCATransitionFromTop, kCATransitionFromRight};
    
        transition.type = types[0];
        transition.subtype = subtypes[1];
    
        [self.view.layer addAnimation:transition forKey:nil];
    } completion:^(BOOL finished) {
        [controller didMoveToParentViewController:self];
    }];
    

    Note, you’ll have to do the following beforehand.

    [self addChildViewController:self.redController];
    [self.view addSubview:self.redController.view];
    

    There are a few things you have to do before using these methods. The main difference is that you’re going to have one more view controller than you current have. This extra UIViewController serves as a container for the other two (kind of like how currently, self.view is a container for the two UIViews you have).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking to build software that has an Iphone application as well as
I want to build out a nodejs app and was looking for a good
I am looking to build a web app that implements background audio and fast
I am looking to build a reset password function in my CakePHP app, and
I'm thinking in build a iPhone app for get recipes. So, I'm looking for
I'm looking to build a query that will use the non-clustered indexing plan on
I'm looking to build a jailbroken device in kiosk mode where only my app
We have an app that has crashed on armv6 iOS devices coming from the
I'm using scribe for making an app that has oauth support. I didn't found
I am looking at two builds of the same app that are supposed to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.