views:

581

answers:

1

hello! I have an animation block that worked fine when runnung the app on iphone OS 2.2. Now I compile the same code for iphone OS 3.0 and it doesn't work.

UIViewAnimationTransition  trans = UIViewAnimationTransitionFlipFromLeft;

[UIView beginAnimations: nil context: NULL];
UIView *forview = [[self view] superview];
[UIView setAnimationTransition: trans forView:forview  cache: YES];
[UIView setAnimationDuration:1.0];

[[self navigationController] popViewControllerAnimated:NO]; 

[UIView commitAnimations];

What the code does, it uses the navigation controller to change the top most view, but with the flip transition and not with the built in one.

any ideas on what might have change in the sdk or what I'm doing wrong?

thanks!!

A: 

This isn't a direct answer to your question but depending on why you're doing this, it may be possible to achieve the effect you're after by using presentModalViewController:animated: with a modalTransitionStyle of UIModalTransitionStyleFlipHorizontal.

hatfinch
thanks for the answer, but that´s not what I need. Any way, I fixed the issue by accesing the view through the appDelegate instead of using the [[self view] superview] method.
nico
In which case, you should post your fix as an answer to your question and mark it as having been answered.
hatfinch