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 6118889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:29:19+00:00 2026-05-23T15:29:19+00:00

the code below implement the switch between two view in a cube animation .

  • 0

the code below implement the switch between two view in a cube animation .

UIViewController* viewCtrl = [[UIViewController alloc] init:book];

CATransition *transition = [CATransition animation];
transition.duration = 1;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = @"cube";
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];

but, if the view don’t belong to self.navigationController, how to do switch in cube animation between two view controller, and then how to scale the current view controller’s view in the same time? thanks very much

  • 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-23T15:29:19+00:00Added an answer on May 23, 2026 at 3:29 pm

    This worked for me:

    -(IBAction)animate:(id)sender {
        NSLog(@"animate");
    
        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];
    
        SecondView *_secondViewController = [[SecondView alloc]initWithNibName:@"secondView" bundle:nil];
        self.secondViewController = _secondViewController;
        _secondViewController = nil;
    
        [[[self view] layer] addAnimation: transition forKey: nil];
        [[self view] addSubview: [self.secondViewController view]];
    }
    
    -(void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag{
        [self.view release];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given the code below, how would you create/implement SR.h so that it produces the
I would like to implement a parallel version of the code below using threads
I would like to implement a bidirectional fifo. The code below is functioning but
I'm trying to implement scripting capability to my application. I'm using the code below.
How can I implement the below code (ActionScript) in Python? var bytes:ByteArray = new
Is the code below the only way to implement covariant return types? public abstract
in the code below i want to implement the floyd algorithm,the user enter some
I'm trying to implement a DialogPreference in the preferences layout. Unfortunatly, the code below
The below code will block all the keyboard shortcuts. Since i wanted to implement
When I implement the code below I get the correct dates: 10/05/2008 10/05/2009 When

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.