Thread: Flip Animation

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2010
    Posts
    6
    Rep Power
    0

    Flip Animation


    I am trying to use a "Flip" transition/animation. On both sides I want to have 2 separate UITables.


    The following code that I am trying to do this with works fine, but it obviously "Flips" with the same view:


    Code:
    	CGContextRef context = UIGraphicsGetCurrentContext();
    	[UIView beginAnimations:nil context:context];
    	[UIView setAnimationTransition: UIViewAnimationTransitionFlipFromLeft forView:self.view cache:YES];
    	[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
    	[UIView setAnimationDuration:1.0];
    	[self.view exchangeSubviewAtIndex:0 withSubviewAtIndex:1];
    	[UIView commitAnimations];

    I don't know where I would include the second UITable for the backside?
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2010
    Posts
    6
    Rep Power
    0
    I have the following code now that is working.

    The problem I am running into now though is that the UINavigationController is flipping too:


    Code:
    	DetailViewControllerLatestElectionPolls *controller = [[DetailViewControllerLatestElectionPolls alloc] initWithNibName:@"DetailView" bundle:nil];
    	UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:controller];
    	[controller release];
    	navController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
    	[self presentModalViewController:navController animated:YES];
    	[navController release];
  4. #3
  5. "That Guy"
    Devshed Novice (500 - 999 posts)

    Join Date
    Apr 2005
    Location
    Wouldn't you like to know? (To come beat me up maybee)
    Posts
    677
    Rep Power
    368
    Id say the problem is:
    Code:
    [self presentModalViewController:navController animated:YES];
    try removing that line.

IMN logo majestic logo threadwatch logo seochat tools logo